File tree 2 files changed +4
-4
lines changed 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 @@ -160,7 +160,7 @@ async function doAsyncIterBreakTest() {
160
160
break ;
161
161
}
162
162
163
- await assert . rejects ( async ( ) => dir . read ( ) , dirclosedError ) ;
163
+ await assert . rejects ( dir . read ( ) , dirclosedError ) ;
164
164
}
165
165
doAsyncIterBreakTest ( ) . then ( common . mustCall ( ) ) ;
166
166
@@ -172,7 +172,7 @@ async function doAsyncIterReturnTest() {
172
172
}
173
173
} ) ( ) ;
174
174
175
- await assert . rejects ( async ( ) => dir . read ( ) , dirclosedError ) ;
175
+ await assert . rejects ( dir . read ( ) , dirclosedError ) ;
176
176
}
177
177
doAsyncIterReturnTest ( ) . then ( common . mustCall ( ) ) ;
178
178
@@ -188,7 +188,7 @@ async function doAsyncIterThrowTest() {
188
188
}
189
189
}
190
190
191
- await assert . rejects ( async ( ) => dir . read ( ) , dirclosedError ) ;
191
+ await assert . rejects ( dir . read ( ) , dirclosedError ) ;
192
192
}
193
193
doAsyncIterThrowTest ( ) . then ( common . mustCall ( ) ) ;
194
194
You can’t perform that action at this time.
0 commit comments