File tree 1 file changed +0
-31
lines changed
1 file changed +0
-31
lines changed Original file line number Diff line number Diff line change @@ -113,34 +113,3 @@ assert.rejects(
113
113
assert . strictEqual ( err . name , 'AbortError' ) ;
114
114
}
115
115
} ) ( ) . then ( common . mustCall ( ) ) ;
116
-
117
- fs . rmdirSync ( tmpdir . path , { recursive : true } ) ;
118
- tmpdir . refresh ( ) ;
119
-
120
- for ( const testCase of kCases ) {
121
- if ( testCase . shouldSkip ) continue ;
122
- fs . mkdirSync ( testCase . dirPath ) ;
123
- // Long content so it's actually flushed.
124
- const content1 = Date . now ( ) + testCase . fileName . toLowerCase ( ) . repeat ( 1e4 ) ;
125
- fs . writeFileSync ( testCase . filePath , content1 ) ;
126
-
127
- const ac = new AbortController ( ) ;
128
-
129
- async function test ( ) {
130
- const { signal } = ac ;
131
- const watcher = watch ( testCase [ testCase . field ] , { signal } ) ;
132
- assert . rejects ( watcher . next ( ) , {
133
- name : 'AbortError'
134
- } ) ;
135
- }
136
-
137
- // Long content so it's actually flushed. toUpperCase so there's real change.
138
- const content2 = Date . now ( ) + testCase . fileName . toUpperCase ( ) . repeat ( 1e4 ) ;
139
- setImmediate ( ( ) => {
140
- fs . writeFileSync ( testCase . filePath , '' ) ;
141
- fs . writeFileSync ( testCase . filePath , content2 ) ;
142
- ac . abort ( ) ;
143
- } ) ;
144
-
145
- test ( ) . then ( common . mustCall ( ) ) ;
146
- }
You can’t perform that action at this time.
0 commit comments