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: nodejs#649
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@gmail.com>
  • Loading branch information
mhdawson authored and Gabriel Schulhof committed Jun 12, 2020
1 parent 204f072 commit 81e2eac
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 81e2eac

Please sign in to comment.