Closed diosney closed 10 years ago
I already tested with:
should(func(true)).throw();
But when the test is run then the Error stack is show rather than captured by should
Maybe, just:
func.bind(null, true).should.throw();//?
Worked like a charm, thanks!
Can you consider adding this example to the docs?
I know its straightforward, but just in case :)
Yes, no problem, i will reopen this to do not forget.
How to pass arguments to setTimeout
/process.nextTick
and so on?
just
(function () {
func(true);
}).should.throw();
is ok.
Fixed in master.
Hi,
How can I pass arguments to the functions that will be tested with
should.throw()
?For instance, I have the following function:
What I need is to do is something like: