summaryrefslogtreecommitdiff
path: root/tests/unit/structured_clone_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/structured_clone_test.ts')
-rw-r--r--tests/unit/structured_clone_test.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/unit/structured_clone_test.ts b/tests/unit/structured_clone_test.ts
index 314a276dd..6e0473f9a 100644
--- a/tests/unit/structured_clone_test.ts
+++ b/tests/unit/structured_clone_test.ts
@@ -9,9 +9,12 @@ Deno.test("self.structuredClone", async () => {
const arrayOriginal = ["hello world"];
const channelOriginal = new MessageChannel();
const [arrayCloned, portTransferred] = self
- .structuredClone([arrayOriginal, channelOriginal.port2], {
- transfer: [channelOriginal.port2],
- });
+ .structuredClone(
+ [arrayOriginal, channelOriginal.port2] as [string[], MessagePort],
+ {
+ transfer: [channelOriginal.port2],
+ },
+ );
assert(arrayOriginal !== arrayCloned); // not the same identity
assertEquals(arrayCloned, arrayOriginal); // but same value
channelOriginal.port1.postMessage("1");