This todo application is meant to showcase a basic MEAN application with a full set of both unit tests, as well as end to end tests. It requires that your system be intially setup and configured with the following:
- node.js / io.js (latest)
- MongoDB
Clone the repository into a folder on your system and run:
npm install
node api.js
To view the demo, navigate to: http://localhost:3000
All node / express unit tests are in /test/unit-express/
To run the node unit tests, run:
mocha
To run the node unit tests and generate code coverage reports, run from the project root:
istanbul cover _mocha
You have to actually quit the istandbul command (ctrl + c) in order to have the reports generated.
To view the reports, navigate to: http://localhost:3000/coverage/node/lcov-report/
All Angular unit tests are in /test/unit-angular/
To run the angular unit tests (which automatically generates code coverage reports on each run), go to the project root folder and run:
karma
To view the code coverage reports, navigate to: http://localhost:3000/coverage/angular/
To run the angular end-to-end tests, run:
protractor