Skip to content

Commit

Permalink
test: add regression test for serdes readDouble()
Browse files Browse the repository at this point in the history
Refs: #37978
PR-URL: #38121
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
  • Loading branch information
cjihrig authored and targos committed May 1, 2021
1 parent 8951c19 commit aa0d814
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 aa0d814

Please sign in to comment.