After converting my app to use jest stead of karma. I see that in the jest.config.js, there is this line to indicate we are collecting coverage:
collectCoverage: true,
Instead of specifying that in the jest.config.js, I would like to use the --coverage option with jest cli instead.
I tried this but it doesn't work
ng test app1 --coverage
Unknown option: '--coverage'
What is the correct way to specify coverage with calling a script instead of hardcoding it on jest.config.js?
--codeCoverage=true
--codeCoverage=true did not work for me, has this changed?
--code-coverage works for me
Most helpful comment
--codeCoverage=true