Skip to content

Commit 4c1fcc4

Browse files
committed
Attempt to fix timing issue in debounce test
1 parent 247c4d8 commit 4c1fcc4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/cli/watcher.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ describe("watches files", () => {
3535
setTimeout(() => {
3636
expect(count).toBe(1);
3737
w.watchers[0].emit("change", "rename", base);
38+
setTimeout(() => {
39+
expect(count).toBe(2);
40+
w.close().then(done);
41+
}, Watcher.interval * 0.5);
3842
}, Watcher.interval * 1.5);
39-
setTimeout(() => {
40-
expect(count).toBe(2);
41-
w.close().then(done);
42-
}, Watcher.interval * 2);
4343
});
4444

4545
it("closes after an error", done => {

0 commit comments

Comments
 (0)