on-internet
← Community

Angular Vitest not working in Test Explorer - Need to call TestBed.initTestEnvironment() first

Stack Overflow ·

Why is it that when I run Angular Vitest tests in the terminal is works fine: But running the same tests in the Test Explorer fails: I tried adding import { BrowserTestingModule, platformBrowserTesting } from "@angular/platform-browser/testing"; TestBed.initTestEnvironment(BrowserTestingModule, platformBrowserTesting()); But that just makes them both fail. There is also no @angular/platform-browser-dynamic in the project anymore as I'm using Angular 21

Comments

Sign in or sign up to comment and upvote.

No comments yet.