Skip to content

Commit 02a2ba3

Browse files
committed
test: adapt test-v8-serdes for V8 9.9
V8 changed the serialization format so we cannot expect that a value serialized by an old version can be reserialized to the same bytes. Change the test to expect that deserialization of the old value still works. Closes: #41519
1 parent 33e8473 commit 02a2ba3

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

test/parallel/test-v8-serdes.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,18 +155,15 @@ const hostObject = new (internalBinding('js_stream').JSStream)();
155155
}
156156

157157
{
158+
// Test that an old serialized value can still be deserialized.
158159
const buf = Buffer.from('ff0d6f2203666f6f5e007b01', 'hex');
159160

160161
const des = new v8.DefaultDeserializer(buf);
161162
des.readHeader();
162-
163-
const ser = new v8.DefaultSerializer();
164-
ser.writeHeader();
165-
166-
ser.writeValue(des.readValue());
167-
168-
assert.deepStrictEqual(buf, ser.releaseBuffer());
169163
assert.strictEqual(des.getWireFormatVersion(), 0x0d);
164+
165+
const value = des.readValue();
166+
assert.strictEqual(value, value.foo);
170167
}
171168

172169
{

0 commit comments

Comments
 (0)