Skip to content

Commit c1f45ec

Browse files
MarlenaMylesBorins
authored andcommitted
test: add 2nd argument to throws in test-assert
PR-URL: #11061 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent db03294 commit c1f45ec

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
@@ -99,9 +99,11 @@ assert.throws(makeBlock(a.deepEqual, /a/m, /a/));
9999
assert.throws(makeBlock(a.deepEqual, /a/igm, /a/im));
100100

101101
{
102-
const re1 = /a/;
102+
const re1 = /a/g;
103103
re1.lastIndex = 3;
104-
assert.throws(makeBlock(a.deepEqual, re1, /a/));
104+
105+
assert.throws(makeBlock(a.deepEqual, re1, /a/g),
106+
/^AssertionError: \/a\/g deepEqual \/a\/g$/);
105107
}
106108

107109

0 commit comments

Comments
 (0)