diff --git a/test/js-native-api/test_bigint/test.js b/test/js-native-api/test_bigint/test.js index bf9ce5066d6d2a..509c263c733a53 100644 --- a/test/js-native-api/test_bigint/test.js +++ b/test/js-native-api/test_bigint/test.js @@ -40,13 +40,13 @@ const { assert.strictEqual(num, TestWords(num)); }); -assert.throws(CreateTooBigBigInt, { +assert.throws(() => CreateTooBigBigInt(), { name: 'Error', message: 'Invalid argument', }); // Test that we correctly forward exceptions from the engine. -assert.throws(MakeBigIntWordsThrow, { +assert.throws(() => MakeBigIntWordsThrow(), { name: 'RangeError', message: 'Maximum BigInt size exceeded' });