util
Summary
Exposes a list of functions to help writing tests.
Item Index
Methods
- check static
Methods
check
Syntax
check
(
static
-
testFunction
-
done
-
{Boolean]
Summary
Executes a function then call done function.
Exception thrown by the function are catched and transmitted to the done function.
Chai throws exceptions while an assertion fails which makes difficult writing ansynchronous tests. Assertions in asynchronous tests must be surrounding by try/catch and call the Mocha done callback with the error in case of a failing assertion.