From 585adacd0624ddf32c5c69a755d8e542f3463861 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 6 Oct 2021 14:41:10 +0200 Subject: [PATCH] fix(@schematics/angular): don't add `destroyAfterEach` in newly generated spec files This is now enabled by default. See https://github.com/angular/angular/pull/43353 for more context. --- .../build_angular/test/hello-world-app/src/test.ts | 1 - .../build_angular/test/hello-world-lib/projects/lib/src/test.ts | 1 - .../schematics/angular/application/files/src/test.ts.template | 1 - packages/schematics/angular/library/files/src/test.ts.template | 1 - 4 files changed, 4 deletions(-) diff --git a/packages/angular_devkit/build_angular/test/hello-world-app/src/test.ts b/packages/angular_devkit/build_angular/test/hello-world-app/src/test.ts index 00b85b49756c..4a6acf914c97 100644 --- a/packages/angular_devkit/build_angular/test/hello-world-app/src/test.ts +++ b/packages/angular_devkit/build_angular/test/hello-world-app/src/test.ts @@ -26,7 +26,6 @@ declare const require: { getTestBed().initTestEnvironment( BrowserDynamicTestingModule, platformBrowserDynamicTesting(), - { teardown: { destroyAfterEach: true }}, ); // Then we find all the tests. const context = require.context('./', true, /\.spec\.ts$/); diff --git a/packages/angular_devkit/build_angular/test/hello-world-lib/projects/lib/src/test.ts b/packages/angular_devkit/build_angular/test/hello-world-lib/projects/lib/src/test.ts index 179ce7251b5c..0ef019623ce1 100644 --- a/packages/angular_devkit/build_angular/test/hello-world-lib/projects/lib/src/test.ts +++ b/packages/angular_devkit/build_angular/test/hello-world-lib/projects/lib/src/test.ts @@ -27,7 +27,6 @@ declare const require: { getTestBed().initTestEnvironment( BrowserDynamicTestingModule, platformBrowserDynamicTesting(), - { teardown: { destroyAfterEach: true }}, ); // Then we find all the tests. const context = require.context('./', true, /\.spec\.ts$/); diff --git a/packages/schematics/angular/application/files/src/test.ts.template b/packages/schematics/angular/application/files/src/test.ts.template index b4dd6032fa21..598d11e862e6 100644 --- a/packages/schematics/angular/application/files/src/test.ts.template +++ b/packages/schematics/angular/application/files/src/test.ts.template @@ -18,7 +18,6 @@ declare const require: { getTestBed().initTestEnvironment( BrowserDynamicTestingModule, platformBrowserDynamicTesting(), - { teardown: { destroyAfterEach: true }}, ); // Then we find all the tests. diff --git a/packages/schematics/angular/library/files/src/test.ts.template b/packages/schematics/angular/library/files/src/test.ts.template index b84c0c21c340..9782baeeef23 100644 --- a/packages/schematics/angular/library/files/src/test.ts.template +++ b/packages/schematics/angular/library/files/src/test.ts.template @@ -19,7 +19,6 @@ declare const require: { getTestBed().initTestEnvironment( BrowserDynamicTestingModule, platformBrowserDynamicTesting(), - { teardown: { destroyAfterEach: true }}, ); // Then we find all the tests.