Skip to content

Commit fe80bd9

Browse files
Marlenaevanlucas
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 8ef4add commit fe80bd9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/parallel/test-assert.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,11 @@ assert.throws(makeBlock(a.deepEqual, /a/igm, /a/im),
102102
/^AssertionError: \/a\/gim deepEqual \/a\/im$/);
103103

104104
{
105-
const re1 = /a/;
105+
const re1 = /a/g;
106106
re1.lastIndex = 3;
107-
assert.throws(makeBlock(a.deepEqual, re1, /a/));
107+
108+
assert.throws(makeBlock(a.deepEqual, re1, /a/g),
109+
/^AssertionError: \/a\/g deepEqual \/a\/g$/);
108110
}
109111

110112

0 commit comments

Comments
 (0)