Skip to content

Commit 4c6f836

Browse files
committed
Increased timeout
1 parent e985635 commit 4c6f836

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/unit.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ test('[Events] debounce + unlink/event', async () => {
110110
await wait(name => fsp.unlink(path.join(dirLocation, name)));
111111

112112
const result = await new Promise((resolve, reject) => {
113-
setTimeout(() => reject('Timeout'), 1000);
113+
setTimeout(() => reject('Timeout'), 3000);
114114
snitch.on('event', (path, event, details) => {
115115
if (typeof details !== 'object') reject('Invalid typeof details');
116116
if (typeof path !== 'string') reject('Bad path: ' + path);
@@ -139,7 +139,7 @@ test('[Events] debounce + update/event', async () => {
139139
await wait(name => fsp.writeFile(path.join(dirLocation, name), '123', 'utf8'));
140140

141141
const result = await new Promise((resolve, reject) => {
142-
setTimeout(() => reject('Timeout'), 1000);
142+
setTimeout(() => reject('Timeout'), 3000);
143143
snitch.on('before', console.log);
144144
snitch.on('event', (path, event, details) => {
145145
if (typeof details !== 'object') reject('Invalid typeof details');
@@ -167,7 +167,7 @@ test('[Events] debounce + new/event', async () => {
167167
await wait(name => fsp.writeFile(path.join(dirLocation, name), '', 'utf8'));
168168

169169
const result = await new Promise((resolve, reject) => {
170-
setTimeout(() => reject('Timeout'), 1000);
170+
setTimeout(() => reject('Timeout'), 3000);
171171
snitch.on('event', (path, event, details) => {
172172
if (typeof details !== 'object') reject('Invalid typeof details');
173173
if (typeof path !== 'string') reject('Bad path: ' + path);
@@ -189,7 +189,7 @@ test('[Events] callback', async () => {
189189
await fsp.mkdir(dirLocation);
190190

191191
const result = await new Promise((resolve, reject) => {
192-
setTimeout(() => reject('Timeout'), 1000);
192+
setTimeout(() => reject('Timeout'), 3000);
193193
snitch.watchSync(dirLocation, (event, path, details) => {
194194
if (typeof details !== 'object') reject('Invalid typeof details');
195195
if (typeof path !== 'string') reject('Bad path: ' + path);
@@ -218,7 +218,7 @@ test('[Events] before/after/event', async () => {
218218
await wait(name => fsp.writeFile(path.join(dirLocation, name), '', 'utf8'));
219219

220220
const result = await new Promise((resolve, reject) => {
221-
setTimeout(() => reject('Timeout'), 1000);
221+
setTimeout(() => reject('Timeout'), 3000);
222222
var count = 0;
223223
var eventCount = 0;
224224
const res = (c = ++count) => c === 3 && resolve();
@@ -274,7 +274,7 @@ test('[Events] recursive', async () => {
274274
await wait(name => fsp.writeFile(path.join(nestedLocation, name), '', 'utf8'));
275275

276276
const result = await new Promise((resolve, reject) => {
277-
setTimeout(() => reject('Timeout'), 1000);
277+
setTimeout(() => reject('Timeout'), 3000);
278278
var count = 0;
279279
snitch.on('event', (path, event) => {
280280
if (!path.includes('nested')) reject();

0 commit comments

Comments
 (0)