Skip to content

Commit

Permalink
Increase wait for fs events to be emitted
Browse files Browse the repository at this point in the history
  • Loading branch information
rubennorte committed Nov 9, 2018
1 parent 1e421e1 commit fe53472
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions e2e/__tests__/watch_mode_no_access.test.js
Expand Up @@ -46,25 +46,25 @@ test('does not re-run tests when only access time is modified', async () => {
'1 failed, 1 total',
);

await sleep(1000);
await sleep(2000);

// Should re-run the test
const modulePath = path.join(DIR, 'foo.js');
const stat = fs.lstatSync(modulePath);
fs.utimesSync(modulePath, stat.atime, stat.mtime);

await sleep(1000);
await sleep(2000);

// Should not re-run the test
const fakeATime = 1541723621;
fs.utimesSync(modulePath, fakeATime, stat.mtime);

await sleep(1000);
await sleep(2000);

// Should re-run the test
fs.writeFileSync(modulePath, 'module.exports = 1;', {encoding: 'utf-8'});

await sleep(1000);
await sleep(2000);

// Should make the test fail and finish the process
fs.writeFileSync(modulePath, 'module.exports = undefined;', {
Expand Down

0 comments on commit fe53472

Please sign in to comment.