mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
test: add 2nd argument to throws in test-assert
PR-URL: https://github.com/nodejs/node/pull/11061 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
3e9ce770f7
commit
8cce29587c
1 file changed
+4
-2
@@ -97,9 +97,11 @@ assert.throws(makeBlock(a.deepEqual, /a/m, /a/));
|
||||
assert.throws(makeBlock(a.deepEqual, /a/igm, /a/im));
|
||||
|
||||
{
|
||||
const re1 = /a/;
|
||||
const re1 = /a/g;
|
||||
re1.lastIndex = 3;
|
||||
assert.throws(makeBlock(a.deepEqual, re1, /a/));
|
||||
|
||||
assert.throws(makeBlock(a.deepEqual, re1, /a/g),
|
||||
/^AssertionError: \/a\/g deepEqual \/a\/g$/);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user