[ACS-12441] unit tests fixes [link-adf:improvement/AAE-51237-upgrade-angular-to-v21][ci:force]

This commit is contained in:
Mykyta Maliarchuk
2026-09-15 16:03:54 +02:00
parent 5855187122
commit 53c42760b6
5 changed files with 29 additions and 15 deletions
@@ -59,6 +59,10 @@ describe('ToolbarMenuItemComponent', () => {
appExtensionService = TestBed.inject(AppExtensionService);
});
afterEach(() => {
fixture.destroy();
});
it('should run action on click', async () => {
const runActionById = spyOn(appExtensionService, 'runActionById');
+6 -1
View File
@@ -26,10 +26,15 @@
import 'zone.js';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { getTestBed, TestBed } from '@angular/core/testing';
import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing';
import { provideZoneChangeDetection } from '@angular/core';
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowserTesting(), {
teardown: { destroyAfterEach: false }
});
beforeEach(() => {
TestBed.configureTestingModule({ providers: [provideZoneChangeDetection()] });
});