Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dynamicbalaji/ngtestingdemo

Unit Testing demo for Angular application
https://github.com/dynamicbalaji/ngtestingdemo

angular angular-cli angular2 angular4 jasmine karma karma-jasmine testing unit-testing unittest

Last synced: about 1 month ago
JSON representation

Unit Testing demo for Angular application

Awesome Lists containing this project

README

        

# NgTestingDemo

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

## Topics Covered

PFB the topics covered in this project:

* Unit Testing Fundamentals
* Working with Strings & Arrays
* Setup and Teardown methods
* Working with Forms
* Working with Event Emitters
* Working with Spies
* Interaction testing with Services
* Working with Confirmation Boxes

PFB the Pattern that are covered in unit testing:

* State Changes
* Forms
* Events (Output properties)
* Services

PFB the limitations of unit testing:

* Routers
* Template bindings

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