Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: convert new tests to use error types #18581

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/addons-napi/test_typedarray/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ arrayTypes.forEach((currentType) => {
const template = Reflect.construct(currentType, buffer);
assert.throws(() => {
test_typedarray.CreateTypedArray(template, buffer, 0, 136);
}, /Invalid typed array length/);
}, RangeError);
});

const nonByteArrayTypes = [ Int16Array, Uint16Array, Int32Array, Uint32Array,
Expand All @@ -71,5 +71,5 @@ nonByteArrayTypes.forEach((currentType) => {
test_typedarray.CreateTypedArray(template, buffer,
currentType.BYTES_PER_ELEMENT + 1, 1);
console.log(`start of offset ${currentType}`);
}, /start offset of/);
}, RangeError);
});
3 changes: 1 addition & 2 deletions test/parallel/test-console-assign-undefined.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ assert.strictEqual(global.console, 42);
common.expectsError(
() => console.log('foo'),
{
type: TypeError,
message: 'console.log is not a function'
type: TypeError
}
);

Expand Down