Skip to content

Commit

Permalink
test: add 2nd argument to throws in test-assert
Browse files Browse the repository at this point in the history
PR-URL: #11061
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Marlena authored and MylesBorins committed Mar 9, 2017
1 parent 3e9ce77 commit 8cce295
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/parallel/test-assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -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$/);
}


Expand Down

0 comments on commit 8cce295

Please sign in to comment.