-
Notifications
You must be signed in to change notification settings - Fork 3
Testing
0x0 edited this page Jan 1, 2018
·
1 revision
This is an important part of any large maintainable software project. There are numerous reasons why we need tests but the most compelling one to me is so that you have some confidence that the new code you are introducing doesn't break your application.
- Seed data:
npm run seed
- Run tests:
npm test
ornpm run mocha
if on windows
As a general rule I would say every time a new route is introduced you should write tests for it
Just copy how the other tests are set out but one thing to be aware off is that you need to add this to the end of the last test file.
after((done) => {
done();
// Done with the tests time to close. This should be placed in the last test file
process.exit();
});