Skip to content
Merged
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
13 changes: 5 additions & 8 deletions test/parallel/test-assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ assert.throws(() => {
{
// Bad args to AssertionError constructor should throw TypeError.
const args = [1, true, false, '', null, Infinity, Symbol('test'), undefined];
args.forEach((input) => {
for (const input of args) {
assert.throws(
() => new assert.AssertionError(input),
{
Expand All @@ -485,7 +485,7 @@ assert.throws(() => {
message: 'The "options" argument must be of type object.' +
common.invalidArgTypeHelper(input)
});
});
}
}

assert.throws(
Expand Down Expand Up @@ -965,11 +965,8 @@ assert.throws(
}
);

[
1,
false,
Symbol(),
].forEach((input) => {
const inputs = [1, false, Symbol()];
for (const input of inputs) {
assert.throws(
() => assert.throws(() => {}, input),
{
Expand All @@ -979,7 +976,7 @@ assert.throws(
common.invalidArgTypeHelper(input)
}
);
});
}

{

Expand Down