-
-
Notifications
You must be signed in to change notification settings - Fork 211
Open
Description
Describe the Bug
The --max-workers or --maxWorkers or setting maxWorkers in angular.json, or even in jest.config.ts does not do anything. The tests are always running in single thread like --runInBand.
This have impact on:
- Performance - we loose whole power of jest and parallel execution
- NodeJS have bug which cause inaccurate code coverage with
v8provider (randomly drop down on some test scenarios). It happens only in single thread mode in Jest, but when running in parallel, the issue does not exist - v8 test coverage in jest is incorrect when upgrading to 20.10.0 nodejs/node#51251 (comment)
Minimal Reproduction
The simplest angular application with just jest builder with jest.config.ts having such configuration:
coverageProvider: 'v8',
collectCoverage: true,
coverageDirectory: 'coverage',
testEnvironment: 'jsdom',
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100,
},
},
Expected Behavior
We should be able to run Jest in parallel
Environment
Libs
- @angular/core version: 19.2.4
- @angular-devkit/build-angular version: @angular-devkit/build-angular
- @angular-builders/jest version: 19.0.0
For Tooling issues:
- Node version: v22.14.0
- Npm version: 11.2.0
- Platform: Macalextwindmill
Metadata
Metadata
Assignees
Labels
No labels