summaryrefslogtreecommitdiff
path: root/cli/js/tests
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-04-24 23:40:29 +0200
committerGitHub <noreply@github.com>2020-04-24 23:40:29 +0200
commit824329f0daa4dfada11ccc4c15a7db6c1886c45f (patch)
tree9cd2ca59c99ab6aaa781528fd91e0638d9024713 /cli/js/tests
parent6a37e4426e686028c38d5e915d91e587c5966804 (diff)
BREAKING CHANGE: rename Deno.fsEvents() to Deno.watchFs() (#4886)
Diffstat (limited to 'cli/js/tests')
-rw-r--r--cli/js/tests/fs_events_test.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/js/tests/fs_events_test.ts b/cli/js/tests/fs_events_test.ts
index 8494bf6af..e31bb2619 100644
--- a/cli/js/tests/fs_events_test.ts
+++ b/cli/js/tests/fs_events_test.ts
@@ -3,10 +3,10 @@ import { unitTest, assert } from "./test_util.ts";
// TODO(ry) Add more tests to specify format.
-unitTest({ perms: { read: false } }, function fsEventsPermissions() {
+unitTest({ perms: { read: false } }, function watchFsPermissions() {
let thrown = false;
try {
- Deno.fsEvents(".");
+ Deno.watchFs(".");
} catch (err) {
assert(err instanceof Deno.errors.PermissionDenied);
thrown = true;
@@ -14,10 +14,10 @@ unitTest({ perms: { read: false } }, function fsEventsPermissions() {
assert(thrown);
});
-unitTest({ perms: { read: true } }, function fsEventsInvalidPath() {
+unitTest({ perms: { read: true } }, function watchFsInvalidPath() {
let thrown = false;
try {
- Deno.fsEvents("non-existant.file");
+ Deno.watchFs("non-existant.file");
} catch (err) {
console.error(err);
if (Deno.build.os === "win") {
@@ -47,9 +47,9 @@ async function getTwoEvents(
unitTest(
{ perms: { read: true, write: true } },
- async function fsEventsBasic(): Promise<void> {
+ async function watchFsBasic(): Promise<void> {
const testDir = await Deno.makeTempDir();
- const iter = Deno.fsEvents(testDir);
+ const iter = Deno.watchFs(testDir);
// Asynchornously capture two fs events.
const eventsPromise = getTwoEvents(iter);