Skip to content

Commit b569b4e

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

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/index.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,23 @@ 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+
const watcherFn = (curr: unknown, prev: unknown) => {
567+
console.log({curr, prev});
568+
};
569+
570+
const watcher = watch(currentDir, { recursive: true }, watcherFn);
571+
572+
await mkdir(parentPath);
573+
await rmr(parentPath);
574+
await mkdir(parentPath);
575+
await mkdir(subPath);
576+
577+
watcher.close();
578+
});
562579
it('should watch removed and re-added directories', async () => {
563580
const unlinkSpy = createSpy<EmitArgs, void>(function unlinkSpy() {});
564581
const addSpy = createSpy<EmitArgs, void>(function addSpy() {});

0 commit comments

Comments
 (0)