Top "Angular-test" questions

Questions about testing Angular code, addressing either specific issues ("why is this test failing"), test flows ("how to test this async call of my component") or test setup ("how do I mock router in this component test"), integration tests ("how to bypass a proxy to my backend in this angular test"), or possibly test-related questions, such as ("Why does this component work and the test is failing?

How to test component error handling with observable service

Context I'm trying to test a component. In another post I asked about testing the direct function call. Here I'm …

angular typescript jasmine karma-jasmine angular-test
Angular Testing, dynamically change ActivatedRoute params for different test cases

Component: @Component({ selector: 'app-test', templateUrl: './test.component.html' }) export class TestComponent implements OnInit { useCase: string; constructor( private route: ActivatedRoute, ) {} …

angular unit-testing jasmine karma-jasmine angular-test
Expected object to be a kind of ScalarObservable, but was Observable

In my Angular application, I was using Observables in the following way: getItem(id): Observable<Object> { return this.…

typescript jasmine rxjs angular-observable angular-test