File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
packages/angular/build/src/builders/unit-test Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -115,8 +115,13 @@ export async function* execute(
115
115
loadContent : async ( ) => {
116
116
const contents : string [ ] = [
117
117
// Initialize the Angular testing environment
118
- `import { getTestBed } from '@angular/core/testing';` ,
118
+ `import { getTestBed, ɵgetCleanupHook as getCleanupHook } from '@angular/core/testing';` ,
119
119
`import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing';` ,
120
+ `import { beforeEach, afterEach } from 'vitest';` ,
121
+ '' ,
122
+ `beforeEach(getCleanupHook(false))` ,
123
+ `afterEach(getCleanupHook(true))` ,
124
+ '' ,
120
125
`getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowserTesting(), {` ,
121
126
` errorOnUnknownElements: true,` ,
122
127
` errorOnUnknownProperties: true,` ,
You can’t perform that action at this time.
0 commit comments