summaryrefslogtreecommitdiff
path: root/js/os_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/os_test.ts')
-rw-r--r--js/os_test.ts28
1 files changed, 0 insertions, 28 deletions
diff --git a/js/os_test.ts b/js/os_test.ts
index 7a252cb73..544d7d49f 100644
--- a/js/os_test.ts
+++ b/js/os_test.ts
@@ -85,34 +85,6 @@ test(async function lstatSyncNotFound() {
assertEqual(badInfo, undefined);
});
-test(async function readFileSyncSuccess() {
- const data = deno.readFileSync("package.json");
- if (!data.byteLength) {
- throw Error(
- `Expected positive value for data.byteLength ${data.byteLength}`
- );
- }
- const decoder = new TextDecoder("utf-8");
- const json = decoder.decode(data);
- const pkg = JSON.parse(json);
- assertEqual(pkg.name, "deno");
-});
-
-/* TODO We should be able to catch specific types.
-test(function tests_readFileSync_NotFound() {
- let caughtError = false;
- let data;
- try {
- data = deno.readFileSync("bad_filename");
- } catch (e) {
- caughtError = true;
- assert(e instanceof deno.NotFound);
- }
- assert(caughtError);
- assert(data === undefined);
-});
-*/
-
testPerm({ write: true }, function writeFileSyncSuccess() {
const enc = new TextEncoder();
const data = enc.encode("Hello");