diff --git a/test/parallel/test-writeuint.js b/test/parallel/test-writeuint.js index e91e1d256d0261..5a2f2da9da75e8 100644 --- a/test/parallel/test-writeuint.js +++ b/test/parallel/test-writeuint.js @@ -129,10 +129,10 @@ function testUint(clazz) { // Test 0 to 5 bytes. for (let i = 0; i <= 5; i++) { const errmsg = `byteLength: ${i}`; - assert.throws(function() { + assert.throws(() => { data.writeUIntBE(val, 0, i); }, /"value" argument is out of bounds/, errmsg); - assert.throws(function() { + assert.throws(() => { data.writeUIntLE(val, 0, i); }, /"value" argument is out of bounds/, errmsg); val *= 0x100;