@@ -10,7 +10,6 @@ import {
1010 ɵisStandalone ,
1111} from '@angular/core' ;
1212import { ComponentFixture , TestBed , tick } from '@angular/core/testing' ;
13- import { By } from '@angular/platform-browser' ;
1413import { BrowserAnimationsModule , NoopAnimationsModule } from '@angular/platform-browser/animations' ;
1514import { NavigationExtras , Router } from '@angular/router' ;
1615import { RouterTestingModule } from '@angular/router/testing' ;
@@ -77,7 +76,7 @@ export async function render<SutType, WrapperType = SutType>(
7776 excludeComponentDeclaration,
7877 wrapper,
7978 } ) ,
80- imports : addAutoImports ( sut , {
79+ imports : addAutoImports ( sut , {
8180 imports : imports . concat ( defaultImports ) ,
8281 routes,
8382 } ) ,
@@ -129,23 +128,23 @@ export async function render<SutType, WrapperType = SutType>(
129128 const [ path , params ] = ( basePath + href ) . split ( '?' ) ;
130129 const queryParams = params
131130 ? params . split ( '&' ) . reduce ( ( qp , q ) => {
132- const [ key , value ] = q . split ( '=' ) ;
133- const currentValue = qp [ key ] ;
134- if ( typeof currentValue === 'undefined' ) {
135- qp [ key ] = value ;
136- } else if ( Array . isArray ( currentValue ) ) {
137- qp [ key ] = [ ...currentValue , value ] ;
138- } else {
139- qp [ key ] = [ currentValue , value ] ;
140- }
141- return qp ;
142- } , { } as Record < string , string | string [ ] > )
131+ const [ key , value ] = q . split ( '=' ) ;
132+ const currentValue = qp [ key ] ;
133+ if ( typeof currentValue === 'undefined' ) {
134+ qp [ key ] = value ;
135+ } else if ( Array . isArray ( currentValue ) ) {
136+ qp [ key ] = [ ...currentValue , value ] ;
137+ } else {
138+ qp [ key ] = [ currentValue , value ] ;
139+ }
140+ return qp ;
141+ } , { } as Record < string , string | string [ ] > )
143142 : undefined ;
144143
145144 const navigateOptions : NavigationExtras | undefined = queryParams
146145 ? {
147- queryParams,
148- }
146+ queryParams,
147+ }
149148 : undefined ;
150149
151150 const doNavigate = ( ) => {
@@ -172,7 +171,7 @@ export async function render<SutType, WrapperType = SutType>(
172171 rerender,
173172 change,
174173 // @ts -ignore: fixture assigned
175- debugElement : typeof sut === 'string' ? fixture . debugElement : fixture . debugElement . query ( By . directive ( sut ) ) ,
174+ debugElement : fixture . debugElement ,
176175 // @ts -ignore: fixture assigned
177176 container : fixture . nativeElement ,
178177 debug : ( element = fixture . nativeElement , maxLength , options ) =>
@@ -398,7 +397,7 @@ if (typeof process === 'undefined' || !process.env?.ATL_SKIP_AUTO_CLEANUP) {
398397}
399398
400399@Component ( { selector : 'atl-wrapper-component' , template : '' } )
401- class WrapperComponent { }
400+ class WrapperComponent { }
402401
403402/**
404403 * Wrap findBy queries to poke the Angular change detection cycle
0 commit comments