From 824329f0daa4dfada11ccc4c15a7db6c1886c45f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 24 Apr 2020 23:40:29 +0200 Subject: BREAKING CHANGE: rename Deno.fsEvents() to Deno.watchFs() (#4886) --- cli/js/tests/fs_events_test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cli/js/tests') 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 { + async function watchFsBasic(): Promise { const testDir = await Deno.makeTempDir(); - const iter = Deno.fsEvents(testDir); + const iter = Deno.watchFs(testDir); // Asynchornously capture two fs events. const eventsPromise = getTwoEvents(iter); -- cgit v1.2.3