diff options
| author | Ryan Dahl <ry@tinyclouds.org> | 2018-05-28 13:17:13 -0400 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2018-05-28 13:30:15 -0400 |
| commit | 33f488354cf28e326d53e51edb50036005882933 (patch) | |
| tree | a55f7d4c7a46181bed99cea050cdac497b8d537a /testdata | |
| parent | 08d3850fa88df2319300874c701da1415b7372a0 (diff) | |
Move testdata/read_file_sync.ts to tests.ts
We don't need to start a new process for every test.
Diffstat (limited to 'testdata')
| -rw-r--r-- | testdata/read_file_sync.ts | 14 | ||||
| -rw-r--r-- | testdata/read_file_sync.ts.out | 1 |
2 files changed, 0 insertions, 15 deletions
diff --git a/testdata/read_file_sync.ts b/testdata/read_file_sync.ts deleted file mode 100644 index cb0904d35..000000000 --- a/testdata/read_file_sync.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { readFileSync } from "deno"; - -let data = 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.name !== "deno") { - throw Error(`Expected "deno" but got "${pkg.name}"`) -} -console.log("package.name ", pkg.name); diff --git a/testdata/read_file_sync.ts.out b/testdata/read_file_sync.ts.out deleted file mode 100644 index 53d818f44..000000000 --- a/testdata/read_file_sync.ts.out +++ /dev/null @@ -1 +0,0 @@ -package.name deno |
