@@ -110,7 +110,7 @@ test('[Events] debounce + unlink/event', async () => {
110
110
await wait ( name => fsp . unlink ( path . join ( dirLocation , name ) ) ) ;
111
111
112
112
const result = await new Promise ( ( resolve , reject ) => {
113
- setTimeout ( ( ) => reject ( 'Timeout' ) , 1000 ) ;
113
+ setTimeout ( ( ) => reject ( 'Timeout' ) , 3000 ) ;
114
114
snitch . on ( 'event' , ( path , event , details ) => {
115
115
if ( typeof details !== 'object' ) reject ( 'Invalid typeof details' ) ;
116
116
if ( typeof path !== 'string' ) reject ( 'Bad path: ' + path ) ;
@@ -139,7 +139,7 @@ test('[Events] debounce + update/event', async () => {
139
139
await wait ( name => fsp . writeFile ( path . join ( dirLocation , name ) , '123' , 'utf8' ) ) ;
140
140
141
141
const result = await new Promise ( ( resolve , reject ) => {
142
- setTimeout ( ( ) => reject ( 'Timeout' ) , 1000 ) ;
142
+ setTimeout ( ( ) => reject ( 'Timeout' ) , 3000 ) ;
143
143
snitch . on ( 'before' , console . log ) ;
144
144
snitch . on ( 'event' , ( path , event , details ) => {
145
145
if ( typeof details !== 'object' ) reject ( 'Invalid typeof details' ) ;
@@ -167,7 +167,7 @@ test('[Events] debounce + new/event', async () => {
167
167
await wait ( name => fsp . writeFile ( path . join ( dirLocation , name ) , '' , 'utf8' ) ) ;
168
168
169
169
const result = await new Promise ( ( resolve , reject ) => {
170
- setTimeout ( ( ) => reject ( 'Timeout' ) , 1000 ) ;
170
+ setTimeout ( ( ) => reject ( 'Timeout' ) , 3000 ) ;
171
171
snitch . on ( 'event' , ( path , event , details ) => {
172
172
if ( typeof details !== 'object' ) reject ( 'Invalid typeof details' ) ;
173
173
if ( typeof path !== 'string' ) reject ( 'Bad path: ' + path ) ;
@@ -189,7 +189,7 @@ test('[Events] callback', async () => {
189
189
await fsp . mkdir ( dirLocation ) ;
190
190
191
191
const result = await new Promise ( ( resolve , reject ) => {
192
- setTimeout ( ( ) => reject ( 'Timeout' ) , 1000 ) ;
192
+ setTimeout ( ( ) => reject ( 'Timeout' ) , 3000 ) ;
193
193
snitch . watchSync ( dirLocation , ( event , path , details ) => {
194
194
if ( typeof details !== 'object' ) reject ( 'Invalid typeof details' ) ;
195
195
if ( typeof path !== 'string' ) reject ( 'Bad path: ' + path ) ;
@@ -218,7 +218,7 @@ test('[Events] before/after/event', async () => {
218
218
await wait ( name => fsp . writeFile ( path . join ( dirLocation , name ) , '' , 'utf8' ) ) ;
219
219
220
220
const result = await new Promise ( ( resolve , reject ) => {
221
- setTimeout ( ( ) => reject ( 'Timeout' ) , 1000 ) ;
221
+ setTimeout ( ( ) => reject ( 'Timeout' ) , 3000 ) ;
222
222
var count = 0 ;
223
223
var eventCount = 0 ;
224
224
const res = ( c = ++ count ) => c === 3 && resolve ( ) ;
@@ -274,7 +274,7 @@ test('[Events] recursive', async () => {
274
274
await wait ( name => fsp . writeFile ( path . join ( nestedLocation , name ) , '' , 'utf8' ) ) ;
275
275
276
276
const result = await new Promise ( ( resolve , reject ) => {
277
- setTimeout ( ( ) => reject ( 'Timeout' ) , 1000 ) ;
277
+ setTimeout ( ( ) => reject ( 'Timeout' ) , 3000 ) ;
278
278
var count = 0 ;
279
279
snitch . on ( 'event' , ( path , event ) => {
280
280
if ( ! path . includes ( 'nested' ) ) reject ( ) ;
0 commit comments