Skip to content

Commit 0792676

Browse files
committed
spelling: temporary
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
1 parent ced2d26 commit 0792676

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

test/fileWatchers-test.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,78 +9,78 @@ import {resolvePath} from "../src/path.js";
99
describe("FileWatchers.of(loaders, path, names, callback)", () => {
1010
it(
1111
"watches a file",
12-
withTemporyWatcher("files.md", ["file-top.csv"], async (root, wait) => {
12+
withTemporaryWatcher("files.md", ["file-top.csv"], async (root, wait) => {
1313
touch(join(root, "file-top.csv"));
1414
assert.deepStrictEqual(await wait(), ["file-top.csv"]);
1515
})
1616
);
1717
it(
1818
"watches multiple files",
19-
withTemporyWatcher("files.md", ["files.md", "subsection/file-sub.csv"], async (root, wait) => {
19+
withTemporaryWatcher("files.md", ["files.md", "subsection/file-sub.csv"], async (root, wait) => {
2020
touch(join(root, "files.md"));
2121
touch(join(root, "subsection/file-sub.csv"));
2222
assert.deepStrictEqual(await wait(), ["files.md", "subsection/file-sub.csv"]);
2323
})
2424
);
2525
it(
2626
"watches a file generated by a data loader",
27-
withTemporyWatcher("simple.md", ["data.txt.js"], ["data.txt"], async (root, wait) => {
27+
withTemporaryWatcher("simple.md", ["data.txt.js"], ["data.txt"], async (root, wait) => {
2828
touch(join(root, "data.txt.js"));
2929
assert.deepStrictEqual(await wait(), ["data.txt"]);
3030
})
3131
);
3232
it(
3333
"watches a file within a static archive",
34-
withTemporyWatcher("zip.md", ["static.zip"], ["static/file.txt"], async (root, wait) => {
34+
withTemporaryWatcher("zip.md", ["static.zip"], ["static/file.txt"], async (root, wait) => {
3535
touch(join(root, "static.zip"));
3636
assert.deepStrictEqual(await wait(), ["static/file.txt"]);
3737
})
3838
);
3939
it(
4040
"watches a file within an archive created by a data loader",
41-
withTemporyWatcher("zip.md", ["dynamic.zip.sh"], ["dynamic/file.txt"], async (root, wait) => {
41+
withTemporaryWatcher("zip.md", ["dynamic.zip.sh"], ["dynamic/file.txt"], async (root, wait) => {
4242
touch(join(root, "dynamic.zip.sh"));
4343
assert.deepStrictEqual(await wait(), ["dynamic/file.txt"]);
4444
})
4545
);
4646
it(
4747
"deduplicates watched files",
48-
withTemporyWatcher("files.md", ["file-top.csv", "file-top.csv"], async (root, wait) => {
48+
withTemporaryWatcher("files.md", ["file-top.csv", "file-top.csv"], async (root, wait) => {
4949
touch(join(root, "file-top.csv"));
5050
assert.deepStrictEqual(await wait(), ["file-top.csv"]);
5151
})
5252
);
5353
it(
5454
"deduplicates watched files based on name, not normalized path",
55-
withTemporyWatcher("files.md", ["file-top.csv", "./file-top.csv"], async (root, wait) => {
55+
withTemporaryWatcher("files.md", ["file-top.csv", "./file-top.csv"], async (root, wait) => {
5656
touch(join(root, "file-top.csv"));
5757
assert.deepStrictEqual(await wait(), ["./file-top.csv", "file-top.csv"]);
5858
})
5959
);
6060
it(
6161
"resolves relative paths",
62-
withTemporyWatcher("subsection/subfiles.md", ["./file-sub.csv", "../file-top.csv"], async (root, wait) => {
62+
withTemporaryWatcher("subsection/subfiles.md", ["./file-sub.csv", "../file-top.csv"], async (root, wait) => {
6363
touch(join(root, "file-top.csv"));
6464
assert.deepStrictEqual(await wait(), ["../file-top.csv"]);
6565
})
6666
);
6767
it(
6868
"resolves absolute paths",
69-
withTemporyWatcher("subsection/subfiles.md", ["/file-top.csv"], async (root, wait) => {
69+
withTemporaryWatcher("subsection/subfiles.md", ["/file-top.csv"], async (root, wait) => {
7070
touch(join(root, "file-top.csv"));
7171
assert.deepStrictEqual(await wait(), ["/file-top.csv"]);
7272
})
7373
);
7474
it(
7575
"ignores missing files",
76-
withTemporyWatcher("files.md", ["file-top.csv"], ["does-not-exist.csv", "file-top.csv"], async (root, wait) => {
76+
withTemporaryWatcher("files.md", ["file-top.csv"], ["does-not-exist.csv", "file-top.csv"], async (root, wait) => {
7777
touch(join(root, "file-top.csv"));
7878
assert.deepStrictEqual(await wait(), ["file-top.csv"]);
7979
})
8080
);
8181
it(
8282
"ignores changes that don’t affect the modification time",
83-
withTemporyWatcher("files.md", ["file-top.csv"], async (root, wait) => {
83+
withTemporaryWatcher("files.md", ["file-top.csv"], async (root, wait) => {
8484
const then = new Date();
8585
touch(join(root, "file-top.csv"), then);
8686
assert.deepStrictEqual(await wait(), ["file-top.csv"]);
@@ -90,14 +90,14 @@ describe("FileWatchers.of(loaders, path, names, callback)", () => {
9090
);
9191
it(
9292
"ignores changes to empty files",
93-
withTemporyWatcher("comment.md", ["empty.js"], async (root, wait) => {
93+
withTemporaryWatcher("comment.md", ["empty.js"], async (root, wait) => {
9494
touch(join(root, "empty.js"));
9595
assert.deepStrictEqual(await wait(10), []);
9696
})
9797
);
9898
it(
9999
"handles a file being renamed",
100-
withTemporyWatcher("files.md", ["temp1.csv"], async (root, wait) => {
100+
withTemporaryWatcher("files.md", ["temp1.csv"], async (root, wait) => {
101101
// First rename the file, while writing a new file to the same place.
102102
renameSync(join(root, "temp1.csv"), join(root, "temp2.csv"));
103103
writeFileSync(join(root, "temp1.csv"), "hello 2", "utf-8");
@@ -110,7 +110,7 @@ describe("FileWatchers.of(loaders, path, names, callback)", () => {
110110
);
111111
it(
112112
"handles a file being renamed and removed",
113-
withTemporyWatcher("files.md", ["file-top.csv", "temp3.csv"], async (root, wait) => {
113+
withTemporaryWatcher("files.md", ["file-top.csv", "temp3.csv"], async (root, wait) => {
114114
// First delete the temp file. We don’t care if this is reported as a change or not.
115115
unlinkSync(join(root, "temp3.csv"));
116116
await pause();
@@ -122,18 +122,18 @@ describe("FileWatchers.of(loaders, path, names, callback)", () => {
122122
);
123123
});
124124

125-
function withTemporyWatcher(
125+
function withTemporaryWatcher(
126126
path: string,
127127
paths: string[], // paths to create and watch
128128
run: (root: string, wait: (delay?: number) => Promise<string[]>) => Promise<void>
129129
): () => Promise<void>;
130-
function withTemporyWatcher(
130+
function withTemporaryWatcher(
131131
path: string,
132132
paths: string[], // paths to create
133133
watchPaths: string[], // paths to watch
134134
run: (root: string, wait: (delay?: number) => Promise<string[]>) => Promise<void>
135135
): () => Promise<void>;
136-
function withTemporyWatcher(...args: any): () => Promise<void> {
136+
function withTemporaryWatcher(...args: any): () => Promise<void> {
137137
const [path, paths, watchPaths = paths, run]: [
138138
path: string,
139139
paths: string[],

0 commit comments

Comments
 (0)