Truthy and Falsy FUNCTIONS for Chai BDD
expect(foo).to.be.okis error-prone. Typo that
okbit and your assertion will ALWAYS pass.
- By adding a
truthy()function, if you make a typo, the function won't exist, it'll throw an error, and you'll know immediately that you goofed up.
chai; // Not necessary in the browser if using globalsvar foo = 42;tobe;var bar = '';tobe;