test: call functions internally

All (or at least most) of the tests uses lambdas (or arrow functions
if you will) to call these functions internally inside of directly
calling them, this should also use this technique for consistency.

PR-URL: https://github.com/nodejs/node/pull/38560
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
This commit is contained in:
Voltrex authored and Michaël Zasso committed 2021-05-17 09:11:33 +02:00
1 parent 10aaf30da1
commit 8f78c6646e
1 file changed
+2 -2
+2 -2
View File
@@ -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'
});