Closed deviprsd closed 1 year ago
It might be because the src/**
which comes later matches - have you tried configuring coveragePathIgnorePatterns
Yes, tried a regex but didn't work. I tried moving src moving up but that had no effect either.
I have disabled collectCoverageFrom
for now, but when I had it enabled even though it was generating some coverage, codacy was always reporting 0%, which is weird.
@deviprsd It look like it's because of the jest-transform-svelte
transformer.
A look into the cache and I found inside the source-map.
"sources":["node_modules/svelte/internal/index.mjs","src/lib/exclude.js","src/elements/step/Description.svelte"]
The transform
is applied here
after matching collectCoverageFrom
hence the generated node_modules/svelte/internal/index.mjs
is sent to the coverage report
@jeysal Can you confirm this?
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
🐛 Bug Report
Jest coverage didn't ignore some of
!**/node_modules/**
as mentioned incollectCoverageFrom
To Reproduce
I'm using
svelte
with@testing-library/svelte
. I'm not sure I can explain how to reproduce it.Expected behavior
Should ignore the files in console in the screenshot,
src/elements/node_modules/svelte/internal
Link to repl or repo (highly encouraged)
https://github.com/titans-inc/sveltemantic
Run
npx envinfo --preset jest