Closed mylifeandcode closed 2 years ago
I have a feeling that this is related to the setup of karma... Let's transfer this to the CLI repository since it is more likely they will know what is going on, and I don't believe it is due to a change in the framework itself.
Hi,
I looks like you are still using the previously deprecated now removed coverage plugin.
The below should fix it.
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
+ require('karma-coverage'),
- require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
....
+ coverageReporter: {
+ dir: require('path').join(__dirname, '../coverage'),
+ subdir: '.',
+ reporters: [
+ { type: 'html' },
+ { type: 'text-summary' }
+ { type: 'lcovonly' }
+ ]
- coverageIstanbulReporter: {
- dir: require('path').join(__dirname, '../coverage'),
- reports: ['html', 'lcovonly'],
- fixWebpackSourcePaths: true
},
npm install karma-coverage --dev
npm uninstall karma-coverage-istanbul-reporter
I'm so sorry! You're absolutely right. This is what I get for not taking care of deprecated dependencies sooner! Thanks, and my apologies again for the trouble.
i also met this issue. but i have a question that why not provide the schematics to help user to migrate from karma-coverage-istanbul-reporter
to karma-coverage
?
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
Which @angular/* package(s) are the source of the bug?
Don't known / other
Is this a regression?
Yes
Description
After upgrading to Angular 13, when I try to run ng test I get the following output:
Please provide a link to a minimal reproduction of the bug
https://github.com/mylifeandcode/workouttracker/tree/Angular13Upgrade/WorkoutTracker.UI/workout-tracker
Please provide the exception or error you saw
Please provide the environment you discovered this bug in
Anything else?
I'm not sure if this is an Angular issue or an issue with the reporting plug-in, so I apologize if it's the latter. This functionality was working until the upgrade to Angular 13.