Skip to content

Commit

Permalink
test: add regression test for serdes readDouble()
Browse files Browse the repository at this point in the history
  • Loading branch information
cjihrig committed Apr 8, 2021
1 parent a7f7ed1 commit 8ef497c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/parallel/test-v8-serdes.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,10 @@ const hostObject = new (internalBinding('js_stream').JSStream)();
/^TypeError: buffer must be a TypedArray or a DataView$/,
);
}

{
// Regression test for https://github.com/nodejs/node/issues/37978
assert.throws(() => {
new v8.Deserializer(new v8.Serializer().releaseBuffer()).readDouble();
}, /ReadDouble\(\) failed/);
}

0 comments on commit 8ef497c

Please sign in to comment.