Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

18 lines
585 B

import { getTestBed, TestBed } from "@angular/core/testing";
import { BrowserTestingModule, platformBrowserTesting } from "@angular/platform-browser/testing";
import { afterEach } from "vitest";
afterEach(() => {
TestBed.resetTestingModule();
});
// Only initialize test environment if it hasn't been initialized yet
// This prevents errors when vitest runs tests in parallel (e.g., in CI)
try {
getTestBed().initTestEnvironment(
BrowserTestingModule,
platformBrowserTesting(),
);
} catch {
// Test environment already initialized, ignore the error
}