diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-08-10 15:00:11 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-08-11 09:02:07 -0700 |
commit | 89eee51f07f5b1689022c84a7d50d9158eaf9cd6 (patch) | |
tree | 70b2905c0a8c3e24ebd055b6bf82d044548dc062 /tests | |
parent | 9be36ffbf8594fe2e155c8113aec56b2a7c19c0b (diff) |
Use unit_tests for readFileSync testing.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/read_file_sync.ts | 18 | ||||
-rw-r--r-- | tests/read_file_sync.ts.out | 1 |
2 files changed, 0 insertions, 19 deletions
diff --git a/tests/read_file_sync.ts b/tests/read_file_sync.ts deleted file mode 100644 index 9e6c555c8..000000000 --- a/tests/read_file_sync.ts +++ /dev/null @@ -1,18 +0,0 @@ -// TODO(ry) Once unit_tests.js lands (#448) this file should be removed -// and replaced with a faster version like was done in the prototype. -// https://github.com/denoland/deno/blob/golang/tests.ts#L34-L45 -import * as deno from "deno"; - -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); -if (pkg['devDependencies'] == null) { - throw Error("Expected a positive number of devDependencies"); -} -console.log("ok"); diff --git a/tests/read_file_sync.ts.out b/tests/read_file_sync.ts.out deleted file mode 100644 index 9766475a4..000000000 --- a/tests/read_file_sync.ts.out +++ /dev/null @@ -1 +0,0 @@ -ok |