Skip to content

Commit f722fe9

Browse files
committed
wip: log it all
1 parent c08a6c4 commit f722fe9

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/index.test.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,28 @@ const runTests = (baseopts: chokidar.ChokidarOptions) => {
559559
ok(spy.calls[0][1]); // stats
560560
ok(rawSpy.called);
561561
});
562+
it('blergh', async () => {
563+
const parentPath = dpath('subdir2');
564+
const subPath = dpath('subdir2/subsub');
565+
const {watch} = await import('fs');
566+
567+
const watcher = watch(currentDir, (ev, name) => {
568+
console.log('CURRENT', {ev, name});
569+
});
570+
571+
await mkdir(parentPath);
572+
573+
const watcherParent = watch(parentPath, (ev, name) => {
574+
console.log('PARENT', {ev, name});
575+
});
576+
577+
await rmr(parentPath);
578+
await mkdir(parentPath);
579+
await mkdir(subPath);
580+
581+
watcher.close();
582+
watcherParent.close();
583+
});
562584
it('should watch removed and re-added directories', async () => {
563585
const unlinkSpy = createSpy<EmitArgs, void>(function unlinkSpy() {});
564586
const addSpy = createSpy<EmitArgs, void>(function addSpy() {});

0 commit comments

Comments
 (0)