Top "Angular2-testing" questions

Angular 2 Testing - Async function call - when to use

When do you use the async function in the TestBed when testing in Angular 2? When do you use this? beforeEach(() =&…

angular unit-testing karma-jasmine angular2-testing angular-test
Angular2 unit testing : testing a component's constructor

All is in the title : how can one test what is done in the component's constructor ? For your information, I …

unit-testing angular angular2-testing
Angular 2 Final Release Router Unit Test

How do I unit test routers in Angular version 2.0.0 with karma and jasmine? Here's what my old unit test looks …

javascript angular karma-jasmine angular2-routing angular2-testing
How to change value of a select box in angular2 unit test?

I have an Angular2 component that contains a select box that looks like <select [(ngModel)]="envFilter" class="form-control" name="…

unit-testing angular typescript karma-jasmine angular2-testing
Testing ngOnChanges lifecycle hook in Angular 2

Given the following code I try to test the ngOnChanges lifecycle hook of Angular2: import { it, inject, fdescribe, beforeEachProviders, } from …

angular karma-jasmine angular2-components angular2-testing
The pipe 'translate' could not be found , angular2 component testing

I am working on component testing with angular2. in my html template i use the translate pipe. This is the …

angular angular-cli angular2-testing ng2-translate
Unhandled Promise rejection: Cannot match any routes

When I run this unit test: it('can click profile link in template', () => { const landingPageLinkDe = linkDes[0]; const profileLinkDe = linkDes[1]; …

angular angular2-routing angular2-testing
How to unit test if an angular 2 component contains another component

I'm quite new to angular 2. I have a component which in turn has some other components in its template. How …

angular karma-jasmine angular2-testing
Testing - Can't resolve all parameters for (ClassName)

Context I created an ApiService class to be able to handle our custom API queries, while using our own serializer + …

angular karma-jasmine angular2-services angular2-testing angular2-injection
Mocking service in a component - mock ignored

This time I'm trying to mock a service (that does http calls) to test a component. @Component({ selector: 'ub-funding-plan', templateUrl: …

angular service mocking angular2-testing