File tree Expand file tree Collapse file tree 1 file changed +4
-22
lines changed Expand file tree Collapse file tree 1 file changed +4
-22
lines changed Original file line number Diff line number Diff line change @@ -113,28 +113,10 @@ function verifyStatObject(stat) {
113
113
await fchmod ( handle , 0o666 ) ;
114
114
await handle . chmod ( 0o666 ) ;
115
115
116
- // `mode` can't be > 0o777
117
- assert . rejects (
118
- async ( ) => chmod ( handle , ( 0o777 + 1 ) ) ,
119
- {
120
- code : 'ERR_INVALID_ARG_TYPE' ,
121
- name : 'TypeError [ERR_INVALID_ARG_TYPE]'
122
- }
123
- ) ;
124
- assert . rejects (
125
- async ( ) => fchmod ( handle , ( 0o777 + 1 ) ) ,
126
- {
127
- code : 'ERR_OUT_OF_RANGE' ,
128
- name : 'RangeError [ERR_OUT_OF_RANGE]'
129
- }
130
- ) ;
131
- assert . rejects (
132
- async ( ) => handle . chmod ( handle , ( 0o777 + 1 ) ) ,
133
- {
134
- code : 'ERR_INVALID_ARG_TYPE' ,
135
- name : 'TypeError [ERR_INVALID_ARG_TYPE]'
136
- }
137
- ) ;
116
+ // Mode larger than 0o777 should be masked off.
117
+ await chmod ( dest , ( 0o777 + 1 ) ) ;
118
+ await fchmod ( handle , 0o777 + 1 ) ;
119
+ await handle . chmod ( 0o777 + 1 ) ;
138
120
139
121
await utimes ( dest , new Date ( ) , new Date ( ) ) ;
140
122
You can’t perform that action at this time.
0 commit comments