Skip to content

Commit

Permalink
[Tests] add some tests with throws and RegExp matching.
Browse files Browse the repository at this point in the history
Closes #269.
  • Loading branch information
ljharb committed Mar 6, 2016
1 parent ed40dc8 commit 7728752
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/throws.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ tape('throws', function (t) {
});

tape('throws (RegExp match)', function (t) {
t.throws(fn, /RegExp/);
t.throws(fn, /RegExp/, 'regex with no anchors');
t.throws(fn, /^TypeError: Reg/, 'regex with starting anchor');
t.throws(fn, /RegExp$/, 'regex with ending anchor');
t.throws(fn, /^TypeError: RegExp$/, 'regex with both anchors');
t.end();
});

Expand Down

0 comments on commit 7728752

Please sign in to comment.