After upgrading to Angular 13 from 12, some of the Unit Tests started failing: Error: Expected one matching request for criteria "Match method: POST, URL: api/
Am trying to write a test for ag grid export method. Here is the component changes export class GridComponent extendsimplements OnInit { gridApi: any; onG
I have following http error interceptor: @Injectable() export class HttpErrorInterceptor implements HttpInterceptor { constructor(private util: UtilService,
When I type "npm run test" in the command line, npm goes to package.json, to the "scripts" section and tries to match "test" there. So far so good. Now, the li
We have a set of Jasmine tests that run successfully in the local web server. http-server. We would like to run these tests from the command line during the
This is my spec file: import { ComponentFixture, TestBed, async } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; im
When trying to run my tests after migrating to angular 13 I get the following error. The tests were running just fine in angular 12. START: 07 02 2022 16:10:25.
I am Jasmine unit testing an angular component, which uses Observables. My component has this lifecycle hook that I am testing: ngOnInit() { this.dataService.
The Story: We have a rather big test codebase with Protractor+Jasmine tests. One of the current problems we have is that some of the test/spec files contain
Gist I have a Monorepo with solely Typescript packages. When I run tsc --build all packages will be compiled to Javascript. This worked fine until I added a pa
Following this post I've decided to write a marble test for this operator. Here is a basic test: it('Test lossy zip', () => { const a = hot('a---a-
i'm trying to use the function of webdriver io 7 setValue() but I always received the same result. I post my code. This is the page object Home import Page from
Is there a way to run ng test for a single file instead of for the entire test suite? Ideally, I'd like to get the quickest possible feedback loop when I'm edi
I am running protractor and jasmine to run unit tests. I need to know the build version of my web app in order to execute different tests. I have declared a v
I am trying to write a unit test for a button that has disabled assigned to a boolean. html looks like: <button *ngIf="!data" id="createBtn" mat-button c
I'm a beginner in angular test with jasmine and i need to test data type(e.g. String, int, etc.) This is my controller, my data is instantiated to null and la
I've been tasked with writing tests for a chat app developed with Angular. Below is the snippet of Angular template code I'm currently writing tests for: <
I try to make a spy on a generic method in typescript, but cannot get Jasmine to recognise it. I have code http: HttpClient <- Not proper code, just showin
How can I spy on MyFunction and return 2 in Jasmine 2.0? I have the following code that errors on the first line inside shouldPass with: Error: function My
I have a service having a breakpoint observer. But how we can trigger window resize event for breakpoint observer to cover all branch and lines. export class B