Skip to content

Commit 95dd156

Browse files
authored
Merge pull request #1062 from CuddlySheep/bugfix/#1058
fix: Fixed bug in unit test which always fails (closes #1058)
2 parents b8b3639 + e487878 commit 95dd156

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,9 +1134,11 @@ const runTests = (baseopts) => {
11341134
});
11351135
it('should not recurse indefinitely on circular symlinks', async () => {
11361136
await fs_symlink(currentDir, getFixturePath('subdir/circular'));
1137-
const watcher = chokidar_watch();
1138-
await waitForWatcher(watcher);
1139-
// return true;
1137+
return new Promise((resolve, reject) => {
1138+
const watcher = chokidar_watch();
1139+
watcher.on(EV_ERROR, resolve());
1140+
watcher.on(EV_READY, reject('The watcher becomes ready, although he watches a circular symlink.'));
1141+
})
11401142
});
11411143
it('should recognize changes following symlinked dirs', async () => {
11421144
const linkedFilePath = sysPath.join(linkedDir, 'change.txt');

0 commit comments

Comments
 (0)