According to docs on the shouldJS site I should be able to do this:
''.should.be.empty();
The ChaiJS site doesn't have an example with should syntax, but it lists it for expect and it seems that the above example would work.
However this yields:
TypeError: Property 'empty' of object #<Assertion> is not a function
What is syntax for the Chai lib empty()
with should style?
Just remove the parens - instead of empty()
, use empty
:
''.should.be.empty;
Further Reading: Docs on Empty
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With