Mocha
- for running the tests
Chai
- for asserting the results
Sinon
- for managing side effects and external dependencies
package.json
Then you can run tests with npm test
. Mocha is then looking for tests under folder test
.
Dummy test
test/start.js
Real test
middleware/is-auth.js
test/auth-middleware.js