diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2021-02-09 15:31:46 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-09 16:31:46 +0100 |
commit | 900953a65a7cb54eb8d11eba4a30e52da7dbb469 (patch) | |
tree | 7ca5b7b8261ffd92c945c618ac8bf9eaf15f5ceb /cli/tests | |
parent | 47b3e4bada01f29a6cf2a143b94d772242bbab67 (diff) |
fix(op_crates): Don't use `Deno.inspect` in op crates (#9332)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/084_worker_custom_inspect.ts | 4 | ||||
-rw-r--r-- | cli/tests/084_worker_custom_inspect.ts.out | 2 | ||||
-rw-r--r-- | cli/tests/084_worker_custom_inspect_worker.ts | 2 | ||||
-rw-r--r-- | cli/tests/integration_tests.rs | 5 | ||||
-rw-r--r-- | cli/tests/unit/event_test.ts | 5 |
5 files changed, 14 insertions, 4 deletions
diff --git a/cli/tests/084_worker_custom_inspect.ts b/cli/tests/084_worker_custom_inspect.ts new file mode 100644 index 000000000..2e7b86a4e --- /dev/null +++ b/cli/tests/084_worker_custom_inspect.ts @@ -0,0 +1,4 @@ +new Worker( + new URL("084_worker_custom_inspect_worker.ts", import.meta.url).href, + { type: "module" }, +); diff --git a/cli/tests/084_worker_custom_inspect.ts.out b/cli/tests/084_worker_custom_inspect.ts.out new file mode 100644 index 000000000..b34300c40 --- /dev/null +++ b/cli/tests/084_worker_custom_inspect.ts.out @@ -0,0 +1,2 @@ +[WILDCARD]ReadableStream { locked: false } +[WILDCARD] diff --git a/cli/tests/084_worker_custom_inspect_worker.ts b/cli/tests/084_worker_custom_inspect_worker.ts new file mode 100644 index 000000000..5be82724e --- /dev/null +++ b/cli/tests/084_worker_custom_inspect_worker.ts @@ -0,0 +1,2 @@ +console.log(new ReadableStream()); +close(); diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 33259583a..f4327212f 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -2685,6 +2685,11 @@ console.log("finish"); assert_eq!(out, ""); } + itest!(_084_worker_custom_inspect { + args: "run --allow-read 084_worker_custom_inspect.ts", + output: "084_worker_custom_inspect.ts.out", + }); + itest!(js_import_detect { args: "run --quiet --reload js_import_detect.ts", output: "js_import_detect.ts.out", diff --git a/cli/tests/unit/event_test.ts b/cli/tests/unit/event_test.ts index a2a6c6e3d..149509c9d 100644 --- a/cli/tests/unit/event_test.ts +++ b/cli/tests/unit/event_test.ts @@ -124,9 +124,6 @@ unitTest(function eventInspectOutput(): void { ]; for (const [event, outputProvider] of cases) { - assertEquals( - event[Symbol.for("Deno.customInspect")](), - outputProvider(event), - ); + assertEquals(Deno.inspect(event), outputProvider(event)); } }); |