Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple and fun.
Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases.
Output:
Calculate
factorial
√ returns 120 when given 5
√ returns the factorial of an input number
√ returns 1 when given 0
3 passing (8ms)