Here I demonstrate some node.js testing techniques with Aftership Challange
, including:
- different scope of tests: unit tests, integration tests, e2e(manual) tests
- mocking strategies: stub, mock, spy
- assertions: promise based assertion, bbd style, mocking assertions
mocha test/unit/*
mocha test/integration/*
- start
mongodb
andbeanstalkd
on localhost DEBUG=* node test/e2e/test.js