diff options
author | Leo K <crowlkats@toaxl.com> | 2021-08-09 10:39:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-09 10:39:00 +0200 |
commit | 16ae4a0d5799c9a4ed776f32929f73b1063ae4e8 (patch) | |
tree | ed5d0def5e0acbf67f2c64ac4664b1af46f4c468 /core/serialize_deserialize_test.js | |
parent | 02c74fb70970fcadb7d1e6dab857eeb2cea20e09 (diff) |
feat(extensions/web): add structuredClone function (#11572)
Co-authored-by: Luca Casonato <hello@lcas.dev>
Diffstat (limited to 'core/serialize_deserialize_test.js')
-rw-r--r-- | core/serialize_deserialize_test.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/serialize_deserialize_test.js b/core/serialize_deserialize_test.js index 6368d56db..b71bed0c9 100644 --- a/core/serialize_deserialize_test.js +++ b/core/serialize_deserialize_test.js @@ -19,7 +19,7 @@ function assertArrayEquals(a1, a2) { function main() { const emptyString = ""; - const emptyStringSerialized = [34, 0]; + const emptyStringSerialized = [255, 13, 34, 0]; assertArrayEquals(Deno.core.serialize(emptyString), emptyStringSerialized); assert( Deno.core.deserialize(new Uint8Array(emptyStringSerialized)) === @@ -29,7 +29,7 @@ function main() { const primitiveValueArray = ["test", "a", null, undefined]; // deno-fmt-ignore const primitiveValueArraySerialized = [ - 65, 4, 34, 4, 116, 101, 115, 116, + 255, 13, 65, 4, 34, 4, 116, 101, 115, 116, 34, 1, 97, 48, 95, 36, 0, 4, ]; assertArrayEquals( @@ -48,11 +48,11 @@ function main() { circularObject.test = circularObject; // deno-fmt-ignore const circularObjectSerialized = [ - 111, 34, 4, 116, 101, 115, 116, 94, - 0, 34, 5, 116, 101, 115, 116, 50, - 34, 2, 100, 100, 34, 5, 116, 101, - 115, 116, 51, 34, 2, 97, 97, 123, - 3, + 255, 13, 111, 34, 4, 116, 101, 115, + 116, 94, 0, 34, 5, 116, 101, 115, + 116, 50, 34, 2, 100, 100, 34, 5, + 116, 101, 115, 116, 51, 34, 2, 97, + 97, 123, 3, ]; assertArrayEquals( |