Writing Unit Tests in Angular 2

  • We won’t be writing end-to-end tests, but unit tests, although we will be using Angular Testing utilities .
  • The testing of the smallest parts of the application through unit testing may seem strange to new developers.
  • In AngularJS 2, testing is provided in two ways: unit testing and end-to-end testing .
  • /sample.component.css’] }) export class SampleComponent implements OnInit { title = ‘Test Sample Component’; constructor() { } ngOnInit() { } }
  • spec.ts ) for the component, which does nothing but test if the components are working correctly together with other components.

Writing Unit Tests in AngularJS 2 – Using Jasmine and Karma – DiscoverSDK Blog

@c0deNinja: Writing Unit Tests in Angular 2 #AngularJS #Testing

Your browser is out-of-date.

Please download one of these up-to-date, free and excellent browsers:

Firefox Mozilla Foundation Chrome Google Internet Explorer Microsoft Opera Opera Software

Writing Unit Tests in Angular 2

You might also like More from author

Comments are closed, but trackbacks and pingbacks are open.