Skip to content

Commit

Permalink
Document that expected must be a RegExp
Browse files Browse the repository at this point in the history
You get silent false positives if you use e.g. TypeError instead of /TypeError/.
  • Loading branch information
domenic committed Aug 27, 2014
1 parent 3cef0da commit 51278a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readme.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ Aliases: `t.notLooseEqual()`, `t.notLooseEquals()`

## t.throws(fn, expected, msg)

Assert that the function call `fn()` throws an exception.
Assert that the function call `fn()` throws an exception. `expected`, if present, must be a `RegExp`.

## t.doesNotThrow(fn, expected, msg)

Expand Down

0 comments on commit 51278a2

Please sign in to comment.