summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2023-10-31 09:43:04 -0700
committerGitHub <noreply@github.com>2023-10-31 16:43:04 +0000
commit646afdf259e9e25b59c5305aff231e131ea2fc52 (patch)
tree95a886cf8129d9c53e9703bcb70cb0aed621aa2b /cli/tests
parente4308aebc0a060e7210362e576e792e558384c24 (diff)
chore: use kqueue backend of notify on macOS (#21028)
Towards #20996 "macos_fsevent" feature of notify links us to CoreFoundation on macOS.
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/node_compat/config.jsonc1
-rw-r--r--cli/tests/node_compat/test/parallel/test-fs-watchfile.js2
-rw-r--r--cli/tests/unit/fs_events_test.ts4
3 files changed, 4 insertions, 3 deletions
diff --git a/cli/tests/node_compat/config.jsonc b/cli/tests/node_compat/config.jsonc
index 93a51b671..85a5818e5 100644
--- a/cli/tests/node_compat/config.jsonc
+++ b/cli/tests/node_compat/config.jsonc
@@ -70,6 +70,7 @@
"test-fs-open.js",
"test-fs-opendir.js",
"test-fs-rmdir-recursive.js",
+ "test-fs-watchfile.js",
"test-fs-write-file.js",
"test-fs-write.js",
"test-http-url.parse-https.request.js",
diff --git a/cli/tests/node_compat/test/parallel/test-fs-watchfile.js b/cli/tests/node_compat/test/parallel/test-fs-watchfile.js
index 4acad4b94..a23620aff 100644
--- a/cli/tests/node_compat/test/parallel/test-fs-watchfile.js
+++ b/cli/tests/node_compat/test/parallel/test-fs-watchfile.js
@@ -107,6 +107,6 @@ if (common.isLinux || common.isOSX || common.isWindows) {
fs.writeFile(path.join(dir, 'foo.txt'), 'foo', common.mustCall((err) => {
if (err) assert.fail(err);
}));
- }, 1);
+ }, 20);
}));
}
diff --git a/cli/tests/unit/fs_events_test.ts b/cli/tests/unit/fs_events_test.ts
index 9330f2007..d923d54c6 100644
--- a/cli/tests/unit/fs_events_test.ts
+++ b/cli/tests/unit/fs_events_test.ts
@@ -22,7 +22,7 @@ Deno.test({ permissions: { read: true } }, function watchFsInvalidPath() {
} else {
assertThrows(() => {
Deno.watchFs("non-existent.file");
- }, Deno.errors.NotFound);
+ }, Error);
}
});
@@ -32,7 +32,7 @@ async function getTwoEvents(
const events = [];
for await (const event of iter) {
events.push(event);
- if (events.length > 2) break;
+ if (events.length == 2) break;
}
return events;
}