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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
Marlena authored and jasnell committed Mar 7, 2017
1 parent ea06647 commit 1eeb38d
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 1eeb38d

Please sign in to comment.