File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
+
2
3
const common = require ( '../common' ) ;
4
+ const assert = require ( 'node:assert' ) ;
5
+ const { describe, it } = require ( 'node:test' ) ;
6
+
3
7
const fs = require ( 'fs' ) ;
4
8
5
9
if ( ! common . isMacOS ) {
6
10
common . skip ( 'this tests works only on MacOS' ) ;
7
11
}
8
12
9
- const assert = require ( 'assert' ) ;
10
-
11
- fs . readdir (
12
- Buffer . from ( '/dev' ) ,
13
- { withFileTypes : true , encoding : 'buffer' } ,
14
- common . mustCall ( ( e , d ) => {
15
- assert . strictEqual ( e , null ) ;
13
+ describe ( 'fs.readdir from buffer' , ( ) => {
14
+ it ( 'it should read from the buffer' , ( t , done ) => {
15
+ fs . readdir (
16
+ Buffer . from ( '/dev' ) ,
17
+ { withFileTypes : true , encoding : 'buffer' } ,
18
+ ( e ) => {
19
+ assert . strictEqual ( e , null ) ;
20
+ done ( ) ;
21
+ }
22
+ ) ;
16
23
} )
17
- ) ;
24
+ } ) ;
You can’t perform that action at this time.
0 commit comments