I I doing unit test cases in Ionic app but facing problem when trying to get code coverage.
When I run command npm test --code-coverage then it should create coverage folder in root of project and inside that folder index.html file should created which will show code coverage
What I have done:
1.Tried in current project but its not working and giving some random error about module not added in entrycomponent. I have checked 2 times all files everything is correct
2.Create new project of Angular. In that project coverage project already created and its working
3.Create new project of Ionic with latest Ionic cli but their also no coverage folder created .
Overall no code coverage working in Ionic and also no coverage folder created in Ionic.
npm run test working perfectly in Ionic projects
npm run test-coverage command then its giving just success and failure test case
Took reference from below links but nothing worrks
If anyone knows solution please respond.