Command
test
Is this a regression?
The previous version in which this bug was not present was
No response
Description
Dependancies
"@vitest/browser-webdriverio": "4.1.10",
"@vitest/coverage-istanbul": "4.1.10",
My angular.json
"test": {
"builder": "@angular/build:unit-test",
"options": {
"browsers": ["chrome", "firefox"],
"buildTarget": "dashboard:build",
"runnerConfig": "vitest-base.config.ts"
}
},
My vitest config file "vitest-base.config.ts"
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
coverage: {
provider: 'istanbul',
reportOnFailure: true,
},
reporters: ['junit'],
outputFile: {
junit: 'test/junit-report.xml',
},
},
});
the problem
When I run the command ng test --watch=false --coverage --browsers=firefoxHeadless
The test excecute as expected without failure but there is no folder test nor file junit-report.xml but a folder coverage and the html application of the report (default angular settings).
I think that vitest-base.config.ts is never read.
Minimal Reproduction
Added these dependancies
"@vitest/browser-webdriverio": "4.1.10",
"@vitest/coverage-istanbul": "4.1.10",
angular.json :
"test": {
"builder": "@angular/build:unit-test",
"options": {
"browsers": ["chrome", "firefox"],
"buildTarget": "dashboard:build",
"runnerConfig": "vitest-base.config.ts"
}
},
vitest-base.config.ts :
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
coverage: {
provider: 'istanbul',
reportOnFailure: true,
},
reporters: ['junit'],
outputFile: {
junit: 'test/junit-report.xml',
},
},
});
the command
run ng test --watch=false --coverage --browsers=firefoxHeadless
Exception or Error
Your Environment
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI : 22.0.6
Angular : 22.0.6
Node.js : 24.18.0
Package Manager : npm 11.16.0
Operating System : win32 x64
┌───────────────────────────┬───────────────────┬───────────────────┐
│ Package │ Installed Version │ Requested Version │
├───────────────────────────┼───────────────────┼───────────────────┤
│ @angular/build │ 22.0.6 │ 22.0.6 │
│ @angular/cdk │ 22.0.4 │ 22.0.4 │
│ @angular/cli │ 22.0.6 │ 22.0.6 │
│ @angular/common │ 22.0.6 │ 22.0.6 │
│ @angular/compiler │ 22.0.6 │ 22.0.6 │
│ @angular/compiler-cli │ 22.0.6 │ 22.0.6 │
│ @angular/core │ 22.0.6 │ 22.0.6 │
│ @angular/forms │ 22.0.6 │ 22.0.6 │
│ @angular/language-service │ 22.0.6 │ 22.0.6 │
│ @angular/material │ 22.0.4 │ 22.0.4 │
│ @angular/platform-browser │ 22.0.6 │ 22.0.6 │
│ @angular/router │ 22.0.6 │ 22.0.6 │
│ rxjs │ 7.8.2 │ 7.8.2 │
│ typescript │ 6.0.3 │ 6.0.3 │
│ vitest │ 4.1.10 │ 4.1.10 │
└───────────────────────────┴───────────────────┴───────────────────┘
Anything else relevant?
No response
Command
test
Is this a regression?
The previous version in which this bug was not present was
No response
Description
Dependancies
"@vitest/browser-webdriverio": "4.1.10",
"@vitest/coverage-istanbul": "4.1.10",
My angular.json
"test": {
"builder": "@angular/build:unit-test",
"options": {
"browsers": ["chrome", "firefox"],
"buildTarget": "dashboard:build",
"runnerConfig": "vitest-base.config.ts"
}
},
My vitest config file "vitest-base.config.ts"
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
coverage: {
provider: 'istanbul',
reportOnFailure: true,
},
reporters: ['junit'],
outputFile: {
junit: 'test/junit-report.xml',
},
},
});
the problem
When I run the command
ng test --watch=false --coverage --browsers=firefoxHeadlessThe test excecute as expected without failure but there is no folder test nor file junit-report.xml but a folder coverage and the html application of the report (default angular settings).
I think that vitest-base.config.ts is never read.
Minimal Reproduction
Added these dependancies
"@vitest/browser-webdriverio": "4.1.10",
"@vitest/coverage-istanbul": "4.1.10",
angular.json :
"test": {
"builder": "@angular/build:unit-test",
"options": {
"browsers": ["chrome", "firefox"],
"buildTarget": "dashboard:build",
"runnerConfig": "vitest-base.config.ts"
}
},
vitest-base.config.ts :
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
coverage: {
provider: 'istanbul',
reportOnFailure: true,
},
reporters: ['junit'],
outputFile: {
junit: 'test/junit-report.xml',
},
},
});
the command
run
ng test --watch=false --coverage --browsers=firefoxHeadlessException or Error
Your Environment
Anything else relevant?
No response