Skip to content

Commit

Permalink
test: update BigInt test for recent change in core
Browse files Browse the repository at this point in the history
nodejs/node@689ab46
changed the expected error for one of the BigInt test cases. This is
ok because BigInt is still in experimental. However, the
result was a failed/hanging test. See
nodejs/build#2131

This changes the test to accept either the new or old behaviour.
We need that so that older versions of Node.js will also pass the
test until the the node core commit above is backported.

PR-URL: #649
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: Nicola Del Gobbo <[email protected]>
  • Loading branch information
mhdawson committed Jan 15, 2020
1 parent e8935bd commit 2fde5c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/bigint.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function test(binding) {
});

assert.throws(TestTooBigBigInt, {
name: 'RangeError',
message: 'Maximum BigInt size exceeded',
name: /^(RangeError|Error)$/,
message: /^(Maximum BigInt size exceeded|Invalid argument)$/,
});
}

0 comments on commit 2fde5c3

Please sign in to comment.