summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-09-16 22:22:43 +0200
committerGitHub <noreply@github.com>2020-09-16 22:22:43 +0200
commit6c4da0e429eb47dae6a220c5576a39f137615bb8 (patch)
treea8715428caea00105acc9a10fcd0f356085d3fa7 /cli/tests
parent104aebdfb5d01f7482bacef6d58c2ce16da44334 (diff)
refactor: remove dispatch_json.js from cli/rt and cli/tsc (#7521)
Instead use Deno.core.jsonOpSync and Deno.core.jsonOpAsync
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/044_bad_resource.ts.out3
-rw-r--r--cli/tests/compiler_js_error.ts.out3
-rw-r--r--cli/tests/unit/buffer_test.ts4
-rw-r--r--cli/tests/unit/dispatch_json_test.ts20
4 files changed, 3 insertions, 27 deletions
diff --git a/cli/tests/044_bad_resource.ts.out b/cli/tests/044_bad_resource.ts.out
index 6d8b9da8a..6f2ac60f8 100644
--- a/cli/tests/044_bad_resource.ts.out
+++ b/cli/tests/044_bad_resource.ts.out
@@ -1,4 +1,3 @@
[WILDCARD]error: Uncaught BadResource: Bad resource ID
- at unwrapResponse ([WILDCARD]dispatch_json.js:[WILDCARD])
- at sendAsync ([WILDCARD]dispatch_json.js:[WILDCARD])
+[WILDCARD]
at async main ([WILDCARD]tests/044_bad_resource.ts:[WILDCARD])
diff --git a/cli/tests/compiler_js_error.ts.out b/cli/tests/compiler_js_error.ts.out
index 15eb6b22c..8c6e6e35e 100644
--- a/cli/tests/compiler_js_error.ts.out
+++ b/cli/tests/compiler_js_error.ts.out
@@ -2,6 +2,3 @@ Check [WILDCARD]compiler_js_error.ts
error: Uncaught Error: Error in TS compiler:
Uncaught AssertionError: Unexpected skip of the emit.
[WILDCARD]
- at unwrapResponse ([WILDCARD]dispatch_json.js:[WILDCARD])
- at sendAsync ([WILDCARD]dispatch_json.js:[WILDCARD])
- at async Object.compile ([WILDCARD]compiler_api.js:[WILDCARD])
diff --git a/cli/tests/unit/buffer_test.ts b/cli/tests/unit/buffer_test.ts
index 7a628cae5..999680be7 100644
--- a/cli/tests/unit/buffer_test.ts
+++ b/cli/tests/unit/buffer_test.ts
@@ -329,9 +329,9 @@ unitTest(async function bufferReadFromSync(): Promise<void> {
unitTest(async function bufferTestGrow(): Promise<void> {
const tmp = new Uint8Array(72);
- for (const startLen of [0, 100, 1000, 10000, 100000]) {
+ for (const startLen of [0, 100, 1000, 10000]) {
const xBytes = repeat("x", startLen);
- for (const growLen of [0, 100, 1000, 10000, 100000]) {
+ for (const growLen of [0, 100, 1000, 10000]) {
const buf = new Deno.Buffer(xBytes.buffer as ArrayBuffer);
// If we read, this affects buf.off, which is good to test.
const nread = (await buf.read(tmp)) ?? 0;
diff --git a/cli/tests/unit/dispatch_json_test.ts b/cli/tests/unit/dispatch_json_test.ts
index 076c9e6f8..29127a85c 100644
--- a/cli/tests/unit/dispatch_json_test.ts
+++ b/cli/tests/unit/dispatch_json_test.ts
@@ -2,28 +2,8 @@ import {
assertStrictEquals,
unitTest,
assertMatch,
- unreachable,
} from "./test_util.ts";
-const openErrorStackPattern = new RegExp(
- `^.*
- at unwrapResponse \\(.*dispatch_json\\.js:.*\\)
- at sendAsync \\(.*dispatch_json\\.js:.*\\)
- at async Object\\.open \\(.*files\\.js:.*\\).*$`,
- "ms",
-);
-
-unitTest(
- { perms: { read: true } },
- async function sendAsyncStackTrace(): Promise<void> {
- await Deno.open("nonexistent.txt")
- .then(unreachable)
- .catch((error): void => {
- assertMatch(error.stack, openErrorStackPattern);
- });
- },
-);
-
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace Deno {