File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ class Dir {
94
94
}
95
95
96
96
read ( callback ) {
97
- return this . #readImpl( true , callback ) ;
97
+ return arguments . length === 0 ? this . #readPromisified ( ) : this . #readImpl( true , callback ) ;
98
98
}
99
99
100
100
#readImpl( maybeSync , callback ) {
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ async function doAsyncIterBreakTest() {
161
161
break ;
162
162
}
163
163
164
- await assert . rejects ( async ( ) => dir . read ( ) , dirclosedError ) ;
164
+ await assert . rejects ( dir . read ( ) , dirclosedError ) ;
165
165
}
166
166
doAsyncIterBreakTest ( ) . then ( common . mustCall ( ) ) ;
167
167
@@ -173,7 +173,7 @@ async function doAsyncIterReturnTest() {
173
173
}
174
174
} ) ( ) ;
175
175
176
- await assert . rejects ( async ( ) => dir . read ( ) , dirclosedError ) ;
176
+ await assert . rejects ( dir . read ( ) , dirclosedError ) ;
177
177
}
178
178
doAsyncIterReturnTest ( ) . then ( common . mustCall ( ) ) ;
179
179
@@ -189,7 +189,7 @@ async function doAsyncIterThrowTest() {
189
189
}
190
190
}
191
191
192
- await assert . rejects ( async ( ) => dir . read ( ) , dirclosedError ) ;
192
+ await assert . rejects ( dir . read ( ) , dirclosedError ) ;
193
193
}
194
194
doAsyncIterThrowTest ( ) . then ( common . mustCall ( ) ) ;
195
195
You can’t perform that action at this time.
0 commit comments