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 authored and danielleadams committed May 8, 2021
1 parent a6dba4d commit 7162bea
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 7162bea

Please sign in to comment.