Testing Deploy your app via CLI

Install TSLint for TypeScript

First ensure you have Protractor and TSLint installed, setup for TypeScript and updated Webdriver

npm install -g tslint typescript npm install -g protractor webdriver-manager update ./node_modules/.bin/webdriver-manager update

Running unit tests

Tests will execute after a build is executed via Karma, and it will automatically watch your files for changes.

You can run tests a single time via --watch=false, and turn off building of the app via --build=false (useful for running it at the same time as ng serve).

ng test

Running end-to-end tests

Before running the tests make sure you are serving the app via ng serve.

End-to-end tests are ran via Protractor.

ng e2e

Linting and formatting code

You can lint your app code by running ng lint. This will use the lint npm script that in generated projects uses tslint.

ng lint
Testing Docs
Resources launch More on Karma (Unit Tests) launch More on Protractor (End to End Tests)