@@ -93,13 +93,13 @@ suite('Dir', () => {
93
93
test ( 'close()' , async ( ) => {
94
94
const dir = fs . opendirSync ( testDirPath ) ;
95
95
await dir . close ( ) ;
96
- rejects ( dir . read ( ) , 'Can not use closed Dir' ) ;
96
+ rejects ( dir . read ( ) ) ;
97
97
} ) ;
98
98
99
99
test ( 'closeSync()' , ( ) => {
100
100
const dir = fs . opendirSync ( testDirPath ) ;
101
101
dir . closeSync ( ) ;
102
- assert . throws ( ( ) => dir . readSync ( ) , 'Can not use closed Dir' ) ;
102
+ assert . throws ( ( ) => dir . readSync ( ) ) ;
103
103
} ) ;
104
104
105
105
test ( 'asynchronous iteration' , async ( ) => {
@@ -119,13 +119,13 @@ suite('Dir', () => {
119
119
test ( 'read after directory is closed' , async ( ) => {
120
120
const dir = fs . opendirSync ( testDirPath ) ;
121
121
await dir . close ( ) ;
122
- await assert . rejects ( dir . read ( ) , 'Can not use closed Dir' ) ;
122
+ await assert . rejects ( dir . read ( ) ) ;
123
123
} ) ;
124
124
125
125
test ( 'readSync after directory is closed' , ( ) => {
126
126
const dir = fs . opendirSync ( testDirPath ) ;
127
127
dir . closeSync ( ) ;
128
- assert . throws ( ( ) => dir . readSync ( ) , 'Can not use closed Dir' ) ;
128
+ assert . throws ( ( ) => dir . readSync ( ) ) ;
129
129
} ) ;
130
130
131
131
test ( 'close multiple times' , async ( ) => {
0 commit comments