Permalink
Browse files

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>
  • Loading branch information...
Marlena authored and Trott committed Jan 29, 2017
1 parent 8c68def commit 262400fd618b7a2ac90357c7c5fb253cb08f23ae
Showing with 4 additions and 2 deletions.
  1. +4 −2 test/parallel/test-assert.js
@@ -102,9 +102,11 @@ assert.throws(makeBlock(a.deepEqual, /a/igm, /a/im),
/^AssertionError: \/a\/gim deepEqual \/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$/);
}

0 comments on commit 262400f

Please sign in to comment.