Skip to content

Commit 8cce295

Browse files
MarlenaMylesBorins
authored andcommitted
test: add 2nd argument to throws in test-assert
PR-URL: #11061 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 3e9ce77 commit 8cce295

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/parallel/test-assert.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,11 @@ assert.throws(makeBlock(a.deepEqual, /a/m, /a/));
9797
assert.throws(makeBlock(a.deepEqual, /a/igm, /a/im));
9898

9999
{
100-
const re1 = /a/;
100+
const re1 = /a/g;
101101
re1.lastIndex = 3;
102-
assert.throws(makeBlock(a.deepEqual, re1, /a/));
102+
103+
assert.throws(makeBlock(a.deepEqual, re1, /a/g),
104+
/^AssertionError: \/a\/g deepEqual \/a\/g$/);
103105
}
104106

105107

0 commit comments

Comments
 (0)