Skip to content

Commit 2838f9b

Browse files
jackhortonMylesBorins
authored andcommittedMay 1, 2018
test: convert new tests to use error types
Backport-PR-URL: #19265 PR-URL: #18581 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 5c0983e commit 2838f9b

File tree

1 file changed

+2
-2
lines changed
  • test/addons-napi/test_typedarray

1 file changed

+2
-2
lines changed
 

‎test/addons-napi/test_typedarray/test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ arrayTypes.forEach((currentType) => {
6060
const template = Reflect.construct(currentType, buffer);
6161
assert.throws(() => {
6262
test_typedarray.CreateTypedArray(template, buffer, 0, 136);
63-
}, /Invalid typed array length/);
63+
}, RangeError);
6464
});
6565

6666
const nonByteArrayTypes = [ Int16Array, Uint16Array, Int32Array, Uint32Array,
@@ -71,5 +71,5 @@ nonByteArrayTypes.forEach((currentType) => {
7171
test_typedarray.CreateTypedArray(template, buffer,
7272
currentType.BYTES_PER_ELEMENT + 1, 1);
7373
console.log(`start of offset ${currentType}`);
74-
}, /start offset of/);
74+
}, RangeError);
7575
});

0 commit comments

Comments
 (0)