diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2024-03-18 13:48:55 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-18 13:48:55 +0530 |
commit | bd6938ac7070bbfb367f0a41b20a18bfa27e8ee8 (patch) | |
tree | fa08a196e9342814aedd776d551829c72eba5e6b /tests/unit_node/v8_test.ts | |
parent | becdad531f2b56684133b3b7ea25169c7102f765 (diff) |
fix(node): implement v8 serialize and deserialize (#22975)
Fixes https://github.com/denoland/deno/issues/22971
Diffstat (limited to 'tests/unit_node/v8_test.ts')
-rw-r--r-- | tests/unit_node/v8_test.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/unit_node/v8_test.ts b/tests/unit_node/v8_test.ts index c9697c870..b91d595db 100644 --- a/tests/unit_node/v8_test.ts +++ b/tests/unit_node/v8_test.ts @@ -1,7 +1,9 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { cachedDataVersionTag, + deserialize, getHeapStatistics, + serialize, setFlagsFromString, } from "node:v8"; import { assertEquals } from "@std/assert/mod.ts"; @@ -53,3 +55,12 @@ Deno.test({ setFlagsFromString("--allow_natives_syntax"); }, }); + +Deno.test({ + name: "serialize deserialize", + fn() { + const s = serialize({ a: 1 }); + const d = deserialize(s); + assertEquals(d, { a: 1 }); + }, +}); |