/angular2-jasmine-karma

Angular 2 application with tests configuration using Jasmine, Karma and Istanbul.

Primary LanguageTypeScript

#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.

About the Project

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)

Before you run the application

Clone this application on your local machine and cd into it. Then do the following:

npm install
npm run build

How to run the application?

npm start

Other recommended ways

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.

How to run tests?

This will run the test using Karma/Jasmine. Shows the result on terminal.

npm test

How to run test coverage report?

This brings test results and coverage status on a nice HTML test report page using Istanbul.

npm run coverage

Frameworks/Libraries Used

  1. Angular JS 2
  2. Jasmine JS
  3. Karma
  4. TyepScript
  5. Lodash

Want to help?

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.