electron/patches/node/fix_serdes_test.patch
electron-roller[bot] 7120c58297
chore: bump node to v20.12.2 (main) (#41710)
* chore: bump node in DEPS to v20.12.0

* chore: update build_add_gn_build_files.patch

* chore: update patches

* chore: bump node in DEPS to v20.12.1

* chore: update patches

* build: encode non-ASCII Latin1 characters as one byte in JS2C

https://github.com/nodejs/node/pull/51605

* crypto: use EVP_MD_fetch and cache EVP_MD for hashes

https://github.com/nodejs/node/pull/51034

* chore: update filenames.json

* chore: bump node in DEPS to v20.12.2

* chore: update patches

* src: support configurable snapshot

https://github.com/nodejs/node/pull/50453

* test: remove test-domain-error-types flaky designation

https://github.com/nodejs/node/pull/51717

* src: avoid draining platform tasks at FreeEnvironment

https://github.com/nodejs/node/pull/51290

* chore: fix accidentally deleted v8 dep

* lib: define FormData and fetch etc. in the built-in snapshot

https://github.com/nodejs/node/pull/51598

* chore: rebase on main

* chore: remove stray log

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Cheng <zcbenz@gmail.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2024-04-17 12:39:13 -04:00

34 lines
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Rose <nornagon@nornagon.net>
Date: Fri, 28 Jan 2022 13:50:21 -0800
Subject: fix serdes test
The V8 wire format version changed.
diff --git a/test/parallel/test-v8-serdes.js b/test/parallel/test-v8-serdes.js
index 296e076a9f760d94293fe4310d6f3a081e3e59f4..be6deaf463977cc65e9f135008c3ce2b2919e22f 100644
--- a/test/parallel/test-v8-serdes.js
+++ b/test/parallel/test-v8-serdes.js
@@ -163,11 +163,11 @@ const hostObject = new (internalBinding('js_stream').JSStream)();
{
// Test that an old serialized value can still be deserialized.
- const buf = Buffer.from('ff0d6f2203666f6f5e007b01', 'hex');
+ const buf = Buffer.from('ff0f6f2203666f6f5e007b01', 'hex');
const des = new v8.DefaultDeserializer(buf);
des.readHeader();
- assert.strictEqual(des.getWireFormatVersion(), 0x0d);
+ assert.strictEqual(des.getWireFormatVersion(), 0x0f);
const value = des.readValue();
assert.strictEqual(value, value.foo);
@@ -202,7 +202,7 @@ const hostObject = new (internalBinding('js_stream').JSStream)();
{
// Unaligned Uint16Array read, with padding in the underlying array buffer.
let buf = Buffer.alloc(32 + 9);
- buf.write('ff0d5c0404addeefbe', 32, 'hex');
+ buf.write('ff0e5c0404addeefbe', 32, 'hex');
buf = buf.slice(32);
const expectedResult = os.endianness() === 'LE' ?