Skip to main content

Posts

Showing posts with the label 5 Projects

How to Setup Test in Angular Project?

Setup a Test Project - Angular CLI install  everything you need to test an Angular application.  This CLI command takes care of Jasmine and karma configuration for you. Run this CLI command- ng   test The test file extension must be “.spec.ts” so that tooling can identify the test file. You can also unit test your app using other testing libraries and test runners. Types of Test  – The all great developer knows his/her testing tools use. Understanding your tools for testing is essential before diving into writing tests. The Testing depends on your project requirements and the project cost. The types of Testing looks like - 1.        Unit Test 2.        Integration Test 3.        End to End (e2e) Test The example looks like – app.component.spec.ts import { TestBed , async } from '@angular/core/testing' ; import { AppComponent } from ...