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 @@ -161,7 +161,7 @@ async function doAsyncIterBreakTest() {
161161 break ;
162162 }
163163
164- await assert . rejects ( async ( ) => dir . read ( ) , dirclosedError ) ;
164+ await assert . rejects ( dir . read ( ) , dirclosedError ) ;
165165}
166166doAsyncIterBreakTest ( ) . then ( common . mustCall ( ) ) ;
167167
@@ -173,7 +173,7 @@ async function doAsyncIterReturnTest() {
173173 }
174174 } ) ( ) ;
175175
176- await assert . rejects ( async ( ) => dir . read ( ) , dirclosedError ) ;
176+ await assert . rejects ( dir . read ( ) , dirclosedError ) ;
177177}
178178doAsyncIterReturnTest ( ) . then ( common . mustCall ( ) ) ;
179179
@@ -189,7 +189,7 @@ async function doAsyncIterThrowTest() {
189189 }
190190 }
191191
192- await assert . rejects ( async ( ) => dir . read ( ) , dirclosedError ) ;
192+ await assert . rejects ( dir . read ( ) , dirclosedError ) ;
193193}
194194doAsyncIterThrowTest ( ) . then ( common . mustCall ( ) ) ;
195195
You can’t perform that action at this time.
0 commit comments