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 <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
cjihrig committed Apr 9, 2021
1 parent ca13f7a commit e96773b
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 e96773b

Please sign in to comment.