Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
rickyes committed May 21, 2020
1 parent 9250a5c commit 5db3f25
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/parallel/test-file-write-stream3.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,12 @@ const run_test_4 = common.mustCall(function() {
const fn = () => {
fs.createWriteStream(filepath, { start: -5, flags: 'r+' });
};
// Verify the range of values using a common integer verifier.
// Limit Number.MAX_SAFE_INTEGER
const err = {
code: 'ERR_OUT_OF_RANGE',
message: 'The value of "start" is out of range. ' +
'It must be >= 0 && <= 9007199254740991. Received -5',
`It must be >= 0 && <= ${Number.MAX_SAFE_INTEGER}. Received -5`,
name: 'RangeError'
};
assert.throws(fn, err);
Expand All @@ -197,10 +199,13 @@ const run_test_5 = common.mustCall(function() {
const fn = () => {
fs.createWriteStream(filepath, { start: 2 ** 53, flags: 'r+' });
};
// Verify the range of values using a common integer verifier.
// Limit Number.MAX_SAFE_INTEGER
const err = {
code: 'ERR_OUT_OF_RANGE',
message: 'The value of "start" is out of range. It must be ' +
'>= 0 && <= 9007199254740991. Received 9_007_199_254_740_992',
`>= 0 && <= ${Number.MAX_SAFE_INTEGER}. ` +
'Received 9_007_199_254_740_992',
name: 'RangeError'
};
assert.throws(fn, err);
Expand Down

0 comments on commit 5db3f25

Please sign in to comment.