Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
djcsdy committed Apr 5, 2024
1 parent 45b7172 commit 7e2b446
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,9 @@ test("observeFileEvents: observe directory non-recursive, open file for write, w
os.platform() === "darwin"
? []
: [
{event: "rename", path: "a"}
// Followed by a "change" event which is omitted by omitDuplicateChangeEvents
{event: "rename", path: "a"},
{event: "change", path: "a"},
{event: "change", path: "a"}
]
);
});
Expand All @@ -157,9 +158,11 @@ test("observeFileEvents: observe directory non-recursive, open file for write, w
? []
: [
{event: "rename", path: "a"},
// Followed by a "change" event which is omitted by omitDuplicateChangeEvents
{event: "rename", path: "b"}
// Followed by a "change" event which is omitted by omitDuplicateChangeEvents
{event: "change", path: "a"},
{event: "change", path: "a"},
{event: "rename", path: "b"},
{event: "change", path: "b"},
{event: "change", path: "b"},
]
);
});
Expand Down Expand Up @@ -204,7 +207,8 @@ test("observeFileEvents: observe directory non-recursive, make inner directory,
os.platform() === "darwin"
? []
: [
{event: "rename", path: "a"},
{event: "rename", path: "a"},
{event: "change", path: "a"},
{event: "rename", path: "c"},
{event: "rename", path: "a"}
]
Expand Down Expand Up @@ -256,8 +260,9 @@ if (os.platform() !== "linux") {
await file.close();
}, true),
[
{event: "rename", path: "a"}
// Followed by a "change" event which is omitted by omitDuplicateChangeEvents
{event: "rename", path: "a"},
{event: "change", path: "a"},
{event: "change", path: "a"}
]
);
});
Expand All @@ -274,9 +279,11 @@ if (os.platform() !== "linux") {
}, true),
[
{event: "rename", path: "a"},
// Followed by a "change" event which is omitted by omitDuplicateChangeEvents
{event: "rename", path: "b"}
// Followed by a "change" event which is omitted by omitDuplicateChangeEvents
{event: "change", path: "a"},
{event: "change", path: "a"},
{event: "rename", path: "b"},
{event: "change", path: "b"},
{event: "change", path: "b"}
]
);
});
Expand Down Expand Up @@ -319,6 +326,7 @@ if (os.platform() !== "linux") {
[
{event: "rename", path: "a"},
{event: "rename", path: `a${sep}b`},
{event: "change", path: "a"},
{event: "rename", path: `a${sep}b`},
{event: "rename", path: "c"},
{event: "rename", path: "a"}
Expand Down

0 comments on commit 7e2b446

Please sign in to comment.