#Angular 2 App Testing
This repo contains a simple Angular App with tests configured. We are using Jasmine, Karma and Istanbul for setting up our tests.
This is a "Angular Restaurant" website, a virtual restaurant displaying a list of menu items. User will be able to choose items online, add it to their cart and then place an online order with different payment methods.
(Status: IN PROGRESS)
Clone this application on your local machine and cd into it. Then do the following:
npm install
npm run build
npm start
On the terminal, do
npm start
Open another terminal tab and then do
npm run build-and-watch
If you use build-and-watch, you do not have to use build. This will build your project for the first time and will watch for any changes in /src/ folder. Once a change is detected, it will re-transpile your TypeScript to JavaScript and push your new stuff to /dist/. You do not have to re start the project, just refresh the page.
** TODO: ** Add browser sync so we do not have even have to reload the page.
This will run the test using Karma/Jasmine. Shows the result on terminal.
npm test
This brings test results and coverage status on a nice HTML test report page using Istanbul.
npm run coverage
Want to file a bug or contribute some code ? Go ahead and issue a PR(Pull Request). The only requirement is you make sure to run all test successfully before creating a PR.