Closed
Description
Command
test
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
19
Description
It appears karma-junit-reporter
does not work in Angular 20. No report file is generated.
Minimal Reproduction
ng new my-app
ng generate config karma
npm install karma-junit-reporter --save-dev
Edit karma.conf.js to add junit plugin and reporter
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-junit-reporter'),
require('karma-coverage'),
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
},
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './coverage/my-app'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
reporters: ['progress', 'kjhtml', 'junit'],
browsers: ['Chrome'],
restartOnFileChange: true
});
};
Run ng test
.
Expected junit xml file to be generated.
Exception or Error
Your Environment
Angular CLI: 20.0.0
Node: 22.16.0
Package Manager: npm 11.4.1
OS: win32 x64
Angular: 20.0.0
... build, cli, common, compiler, compiler-cli, core, forms
... localize, platform-browser, router
Package Version
------------------------------------------------------
@angular-devkit/architect 0.2000.0
@angular-devkit/core 20.0.0
@angular-devkit/schematics 20.0.0
@schematics/angular 20.0.0
rxjs 7.8.2
typescript 5.8.3
zone.js 0.15.1
Anything else relevant?
No response