summaryrefslogtreecommitdiff
path: root/js/unit_tests.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-08-10 15:00:11 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-08-11 09:02:07 -0700
commit89eee51f07f5b1689022c84a7d50d9158eaf9cd6 (patch)
tree70b2905c0a8c3e24ebd055b6bf82d044548dc062 /js/unit_tests.ts
parent9be36ffbf8594fe2e155c8113aec56b2a7c19c0b (diff)
Use unit_tests for readFileSync testing.
Diffstat (limited to 'js/unit_tests.ts')
-rw-r--r--js/unit_tests.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/js/unit_tests.ts b/js/unit_tests.ts
index 6989e22c4..7caae5283 100644
--- a/js/unit_tests.ts
+++ b/js/unit_tests.ts
@@ -4,7 +4,7 @@
// ./deno tests.ts
import { test, assert, assertEqual } from "./testing/testing.ts";
-// import { readFileSync, writeFileSync } from "deno";
+import { readFileSync } from "deno";
test(async function tests_test() {
assert(true);
@@ -79,13 +79,6 @@ test(function tests_console_stringify_circular() {
}
});
-/*
-test(async function tests_fetch() {
- const response = await fetch("http://localhost:4545/package.json");
- const json = await response.json();
- assertEqual(json.name, "deno");
-});
-
test(async function tests_readFileSync() {
const data = readFileSync("package.json");
if (!data.byteLength) {
@@ -99,6 +92,13 @@ test(async function tests_readFileSync() {
assertEqual(pkg.name, "deno");
});
+/*
+test(async function tests_fetch() {
+ const response = await fetch("http://localhost:4545/package.json");
+ const json = await response.json();
+ assertEqual(json.name, "deno");
+});
+
test(async function tests_writeFileSync() {
const enc = new TextEncoder();
const data = enc.encode("Hello");