Top "Angular2-testing" questions

Error: Unexpected value 'FormGroup' declared by the module 'DynamicTestModule'

Our project structure follows this: Angular2-webpack-starter. Our project successfully compiles, build and can be seen in the browser. No …

javascript angular typescript karma-jasmine angular2-testing
Angular2 Testing No provider for LocationStrategy

I am trying to write a test for a Component, but I always get the error: "Error: Error in ./ExpenseOverviewComponent …

angular jasmine webpack karma-runner angular2-testing
Unit Testing angular2 component with imported module

I am trying to write a test on a component which uses angular-material2, but when I add it to my …

angular typescript karma-jasmine angular2-testing angular-material2
Angular 2 Custom validation unit testing

i'm writing custom angular(Angular 2.0.0) validation, following this guide https://angular.io/docs/ts/latest/cookbook/form-validation.html#!#custom-validation . @Directive({ …

angular typescript angular2-directives angular2-forms angular2-testing
How to Unit Test Angular 2 routing params

Say that I want to simply unit test a component that takes parameters taken from a part of the route. …

angular angular2-routing angular2-testing
Angular2 how to unit test a custom validator directive?

I wrote a very simple custom validor for an input field: import { Directive } from '@angular/core'; import { AbstractControl, NG_…

unit-testing angular karma-jasmine angular2-forms angular2-testing
How to mock a observable stream while testing angular2 components?

I am writing test cases for angular2 components. I had created a service which uses observable stream as below: import {…

angular jasmine angular2-testing angular2-observables
Angular2 Component: Testing form input value change

I have a text input and i'm listening for the changes. mycomponent.ts ngOnInit() { this.searchInput = new Control(); this.searchInput.…

unit-testing angular angular2-forms angular2-components angular2-testing
What is the difference between fakeAsync and async in angular2 testing

I know that tick() function utilizes fakeAsync. And also I can use fixture.whenStable().then() with async and fakeAsync as …

javascript angular jasmine karma-jasmine angular2-testing
Angular2 RC5 Mock Activated Route Params

I need to be able to mock the activated route parameters to be able to test my component. Here's my …

angular typescript angular2-routing angular2-testing