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 {
9494 }
9595
9696 read ( callback ) {
97- return this . #readImpl( true , callback ) ;
97+ return arguments . length === 0 ? this . #readPromisified ( ) : this . #readImpl( true , callback ) ;
9898 }
9999
100100 #readImpl( maybeSync , callback ) {
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ async function doAsyncIterBreakTest() {
160160 break ;
161161 }
162162
163- await assert . rejects ( async ( ) => dir . read ( ) , dirclosedError ) ;
163+ await assert . rejects ( dir . read ( ) , dirclosedError ) ;
164164}
165165doAsyncIterBreakTest ( ) . then ( common . mustCall ( ) ) ;
166166
@@ -172,7 +172,7 @@ async function doAsyncIterReturnTest() {
172172 }
173173 } ) ( ) ;
174174
175- await assert . rejects ( async ( ) => dir . read ( ) , dirclosedError ) ;
175+ await assert . rejects ( dir . read ( ) , dirclosedError ) ;
176176}
177177doAsyncIterReturnTest ( ) . then ( common . mustCall ( ) ) ;
178178
@@ -188,7 +188,7 @@ async function doAsyncIterThrowTest() {
188188 }
189189 }
190190
191- await assert . rejects ( async ( ) => dir . read ( ) , dirclosedError ) ;
191+ await assert . rejects ( dir . read ( ) , dirclosedError ) ;
192192}
193193doAsyncIterThrowTest ( ) . then ( common . mustCall ( ) ) ;
194194
You can’t perform that action at this time.
0 commit comments