diff --git a/modules/testing/builder/src/builder-harness.ts b/modules/testing/builder/src/builder-harness.ts index ecee882739d8..092206698f83 100644 --- a/modules/testing/builder/src/builder-harness.ts +++ b/modules/testing/builder/src/builder-harness.ts @@ -115,6 +115,10 @@ export class BuilderHarness { return join(getSystemPath(this.host.root()), path); } + resetProjectMetadata(): void { + this.projectMetadata = DEFAULT_PROJECT_METADATA; + } + useProject(name: string, metadata: Record = {}): this { if (!name) { throw new Error('Project name cannot be an empty string.'); diff --git a/modules/testing/builder/src/jasmine-helpers.ts b/modules/testing/builder/src/jasmine-helpers.ts index b204d507bab8..15045a2f56d5 100644 --- a/modules/testing/builder/src/jasmine-helpers.ts +++ b/modules/testing/builder/src/jasmine-helpers.ts @@ -37,7 +37,11 @@ export function describeBuilder( }); describe(options.name || builderHandler.name, () => { - beforeEach(() => host.initialize().toPromise()); + beforeEach(async () => { + harness.resetProjectMetadata(); + + await host.initialize().toPromise(); + }); afterEach(() => host.restore().toPromise()); diff --git a/packages/angular/build/src/utils/worker-pool.ts b/packages/angular/build/src/utils/worker-pool.ts index 3a4b3def27cb..78db4302ef1a 100644 --- a/packages/angular/build/src/utils/worker-pool.ts +++ b/packages/angular/build/src/utils/worker-pool.ts @@ -15,7 +15,7 @@ export class WorkerPool extends Piscina { constructor(options: WorkerPoolOptions) { const piscinaOptions: WorkerPoolOptions = { minThreads: 1, - idleTimeout: 1000, + idleTimeout: 4_000, // Web containers do not support transferable objects with receiveOnMessagePort which // is used when the Atomics based wait loop is enable. atomics: process.versions.webcontainer ? 'disabled' : 'sync',