Open GeorgeTailor opened 3 years ago
Hi, I've attempted a replication here. I also could not get exclude to work but I also couldn't get it to work with the sourcemap options on or off. https://github.com/melissamcewen/snowpack-repros/tree/issue-2849/issue-2848
Let me know if I did something wrong.
Related: #2848
I cannot find why it works in my project.
In the project created with npx create-snowpack-app snowpack-tests-sourcemap --template @snowpack/app-template-react-typescript
it does not work at all. I mean the exclude option does not work no matter what I do.
Bug Report Quick Checklist
Describe the bug
For some reason web-test-runner places files like myComponent.css.proxy.js in the final coverage report. But when trying to open that file I get the following error:
Unable to lookup source: /frontend/dist/common/IconCommon.css.proxy.js (ENOENT: no such file or directory, open '/frontend/dist/common/IconCommon.css.proxy.js')
One way to "fix" it is to add it to exclude options, but why such files are in the coverage report in the first place?
To Reproduce
We can't fix bugs that we can't see for ourselves. Issues often need to be closed if this section is skipped.
npx create-snowpack-app snowpack-tests-sourcemap --template @snowpack/app-template-react-typescript
--coverage
option tonpm test
inpackage.json
npm test
snowpack-tests-sourcemap/coverage/lcov-report/
Expected behavior
Coverage report should not include test files themselves out of the box. When I've tried to exclude them manually via
in my
web-test-runner.config.js
it does not work. What I needed to do is to add:to
snowpack.config.js
.This is not documented anywhere and it should be provided by the plugin itself.