summaryrefslogtreecommitdiff
path: root/cli/js/os_test.ts
diff options
context:
space:
mode:
authorNayeem Rahman <muhammed.9939@gmail.com>2019-12-21 00:06:07 +0000
committerRy Dahl <ry@tinyclouds.org>2019-12-20 19:06:07 -0500
commitb7b0668c782dd4bc92237d91116f033e57536238 (patch)
tree74d9f68e17d35030254435c7f1c03e9227b27c4d /cli/js/os_test.ts
parente8d82a6348d4cf9fc6a023fe16bf75df7fea61b0 (diff)
feat: Return null on error in Deno.dir() (#3531)
Diffstat (limited to 'cli/js/os_test.ts')
-rw-r--r--cli/js/os_test.ts7
1 files changed, 1 insertions, 6 deletions
diff --git a/cli/js/os_test.ts b/cli/js/os_test.ts
index e77678ec1..55a62792d 100644
--- a/cli/js/os_test.ts
+++ b/cli/js/os_test.ts
@@ -242,12 +242,7 @@ testPerm({ env: true }, function getDir(): void {
if (r.shouldHaveValue) {
assertNotEquals(Deno.dir(s.kind), "");
} else {
- // if not support your platform. it should throw an error
- assertThrows(
- () => Deno.dir(s.kind),
- Deno.DenoError,
- `Could not get user ${s.kind} directory.`
- );
+ assertEquals(Deno.dir(s.kind), null);
}
}
}