From 5f816e62e2b7a6e96c6760302322cb805d952356 Mon Sep 17 00:00:00 2001 From: Aristeidis Bampakos Date: Tue, 26 Nov 2024 22:13:45 +0200 Subject: [PATCH 1/2] refactor(@schematics/angular): remove extraneous import from spec file --- .../standalone-files/src/app/app.component.spec.ts.template | 2 +- .../__name@dasherize__.__type@dasherize__.spec.ts.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/schematics/angular/application/files/standalone-files/src/app/app.component.spec.ts.template b/packages/schematics/angular/application/files/standalone-files/src/app/app.component.spec.ts.template index 300f7b6466ae..273e49f1d2da 100644 --- a/packages/schematics/angular/application/files/standalone-files/src/app/app.component.spec.ts.template +++ b/packages/schematics/angular/application/files/standalone-files/src/app/app.component.spec.ts.template @@ -5,7 +5,7 @@ import { AppComponent } from './app.component'; describe('AppComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [AppComponent],<% if(experimentalZoneless) { %> + <% if(experimentalZoneless) { %> providers: [provideExperimentalZonelessChangeDetection()]<% } %> }).compileComponents(); }); diff --git a/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template b/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template index 070ef601b634..e6c6abcb7641 100644 --- a/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template +++ b/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template @@ -8,7 +8,7 @@ describe('<%= classify(name) %><%= classify(type) %>', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - <%= standalone ? 'imports' : 'declarations' %>: [<%= classify(name) %><%= classify(type) %>] + <%= standalone ? '' : 'declarations' %>: [<%= classify(name) %><%= classify(type) %>] }) .compileComponents(); From 9e8825e14e85b748a40126c585c5af05bc49ce06 Mon Sep 17 00:00:00 2001 From: Aristeidis Bampakos Date: Tue, 3 Dec 2024 18:42:53 +0000 Subject: [PATCH 2/2] fixup! refactor(@schematics/angular): remove extraneous import from spec file --- .../__name@dasherize__.__type@dasherize__.spec.ts.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template b/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template index e6c6abcb7641..2e816c3b21a8 100644 --- a/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template +++ b/packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template @@ -8,7 +8,7 @@ describe('<%= classify(name) %><%= classify(type) %>', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - <%= standalone ? '' : 'declarations' %>: [<%= classify(name) %><%= classify(type) %>] + <%= standalone ? '' : 'declarations: [<%= classify(name) %><%= classify(type) %>]' %> }) .compileComponents();