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.
We might want to hold off until after 1.0.0, not sure. Closes #275 (closed).
R=@bnoordhuis