-
Notifications
You must be signed in to change notification settings - Fork 30.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
assert: throw when block is not a function
Currently, anything passed as the block argument to throws() and doesNotThrow() is interpreted as a function, which can lead to unexpected results. This commit checks the type of block, and throws a TypeError if it is not a function. Fixes: #275 PR-URL: #308 Reviewed-By: Ben Noordhuis <[email protected]>
- Loading branch information
Showing
2 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters