Skip to content

dynamicbalaji/ngIntTestingDemo

Repository files navigation

NgIntTestingDemo

This project explains how to write Integration Testing suites for Angular applications.

Topics Covered

PFB the topics covered in this project:

  • Basic setup to create test cases
  • Testing Property Bindings
  • Testing Event Bindings
  • Providing dependencies
  • Getting the dependencies
  • Providing Stubs
  • Testing the Navigation
  • Dealing with Route Params
  • Testing RouterOutlet Component
  • Testing routerLink
  • Shallow Component tests
  • Testing Attribute Directives
  • Dealing with Asynchronous Operations (Promise)

Code Coverage

Use below command to check on the code coverage:

ng test --code-coverage

After running this command, you will find a new folder 'coverage' will be created under project folder. Open the index.html file in that folder to see the code coverage details.

Tech Stack

  • Angular CLI - 1.5.0
  • Karma - 1.7.0
  • Jasmine - 2.5.53
  • Typescript - 2.4.2
  • RxJS - 5.5.2