Skip to content

Commit ac523f5

Browse files
Updated testing-libary.ts
Adresses the breaking change which comes trough angular/angular#48114
1 parent 2b46507 commit ac523f5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

projects/testing-library/src/lib/testing-library.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
OnChanges,
88
SimpleChanges,
99
ApplicationInitStatus,
10-
ɵisStandalone,
10+
isStandalone,
1111
} from '@angular/core';
1212
import { ComponentFixture, TestBed, tick } from '@angular/core/testing';
1313
import { BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations';
@@ -321,7 +321,7 @@ function setComponentInputs<SutType>(
321321

322322
function overrideComponentImports<SutType>(sut: Type<SutType> | string, imports: (Type<any> | any[])[] | undefined) {
323323
if (imports) {
324-
if (typeof sut === 'function' && ɵisStandalone(sut)) {
324+
if (typeof sut === 'function' && isStandalone(sut)) {
325325
TestBed.overrideComponent(sut, { set: { imports } });
326326
} else {
327327
throw new Error(
@@ -369,7 +369,7 @@ function addAutoDeclarations<SutType>(
369369
return [...declarations, wrapper];
370370
}
371371

372-
const components = () => (excludeComponentDeclaration || ɵisStandalone(sut) ? [] : [sut]);
372+
const components = () => (excludeComponentDeclaration || isStandalone(sut) ? [] : [sut]);
373373
return [...declarations, ...components()];
374374
}
375375

@@ -384,7 +384,7 @@ function addAutoImports<SutType>(
384384
};
385385

386386
const routing = () => (routes ? [RouterTestingModule.withRoutes(routes)] : []);
387-
const components = () => (typeof sut !== 'string' && ɵisStandalone(sut) ? [sut] : []);
387+
const components = () => (typeof sut !== 'string' && isStandalone(sut) ? [sut] : []);
388388
return [...imports, ...components(), ...animations(), ...routing()];
389389
}
390390

0 commit comments

Comments
 (0)