summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/tests/084_worker_custom_inspect.ts4
-rw-r--r--cli/tests/084_worker_custom_inspect.ts.out2
-rw-r--r--cli/tests/084_worker_custom_inspect_worker.ts2
-rw-r--r--cli/tests/integration_tests.rs5
-rw-r--r--cli/tests/unit/event_test.ts5
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));
}
});