summaryrefslogtreecommitdiff
path: root/cli/js/read_dir_test.ts
diff options
context:
space:
mode:
authordubiousjim <dubiousjim@gmail.com>2020-03-06 08:34:02 -0500
committerGitHub <noreply@github.com>2020-03-06 08:34:02 -0500
commit9a63902db5bc33f3130c7227299cfb3b5be400ae (patch)
tree2d8215f1e153d5ca20ff608973a1988c589eaa58 /cli/js/read_dir_test.ts
parentafea9b2edd4becf66bdc6d40a0cb0dbe29267524 (diff)
Rename readDir -> readdir (#4225)
Diffstat (limited to 'cli/js/read_dir_test.ts')
-rw-r--r--cli/js/read_dir_test.ts24
1 files changed, 12 insertions, 12 deletions
diff --git a/cli/js/read_dir_test.ts b/cli/js/read_dir_test.ts
index 6df4373cf..95936c645 100644
--- a/cli/js/read_dir_test.ts
+++ b/cli/js/read_dir_test.ts
@@ -21,15 +21,15 @@ function assertSameContent(files: FileInfo[]): void {
assertEquals(counter, 2);
}
-unitTest({ perms: { read: true } }, function readDirSyncSuccess(): void {
- const files = Deno.readDirSync("cli/tests/");
+unitTest({ perms: { read: true } }, function readdirSyncSuccess(): void {
+ const files = Deno.readdirSync("cli/tests/");
assertSameContent(files);
});
-unitTest({ perms: { read: false } }, function readDirSyncPerm(): void {
+unitTest({ perms: { read: false } }, function readdirSyncPerm(): void {
let caughtError = false;
try {
- Deno.readDirSync("tests/");
+ Deno.readdirSync("tests/");
} catch (e) {
caughtError = true;
assert(e instanceof Deno.errors.PermissionDenied);
@@ -37,12 +37,12 @@ unitTest({ perms: { read: false } }, function readDirSyncPerm(): void {
assert(caughtError);
});
-unitTest({ perms: { read: true } }, function readDirSyncNotDir(): void {
+unitTest({ perms: { read: true } }, function readdirSyncNotDir(): void {
let caughtError = false;
let src;
try {
- src = Deno.readDirSync("cli/tests/fixture.json");
+ src = Deno.readdirSync("cli/tests/fixture.json");
} catch (err) {
caughtError = true;
assert(err instanceof Error);
@@ -51,12 +51,12 @@ unitTest({ perms: { read: true } }, function readDirSyncNotDir(): void {
assertEquals(src, undefined);
});
-unitTest({ perms: { read: true } }, function readDirSyncNotFound(): void {
+unitTest({ perms: { read: true } }, function readdirSyncNotFound(): void {
let caughtError = false;
let src;
try {
- src = Deno.readDirSync("bad_dir_name");
+ src = Deno.readdirSync("bad_dir_name");
} catch (err) {
caughtError = true;
assert(err instanceof Deno.errors.NotFound);
@@ -65,19 +65,19 @@ unitTest({ perms: { read: true } }, function readDirSyncNotFound(): void {
assertEquals(src, undefined);
});
-unitTest({ perms: { read: true } }, async function readDirSuccess(): Promise<
+unitTest({ perms: { read: true } }, async function readdirSuccess(): Promise<
void
> {
- const files = await Deno.readDir("cli/tests/");
+ const files = await Deno.readdir("cli/tests/");
assertSameContent(files);
});
-unitTest({ perms: { read: false } }, async function readDirPerm(): Promise<
+unitTest({ perms: { read: false } }, async function readdirPerm(): Promise<
void
> {
let caughtError = false;
try {
- await Deno.readDir("tests/");
+ await Deno.readdir("tests/");
} catch (e) {
caughtError = true;
assert(e instanceof Deno.errors.PermissionDenied);