-
Notifications
You must be signed in to change notification settings - Fork 921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
web-test-runner-plugin blocks code coverage #1378
Comments
I'm experiencing this issue as well |
I'd love some help debugging this! In your node-modules directory, can you add a console.log to:
async serve({request}) {
+ console.log('SERVE', request.url);
if (request.url.startsWith('/__web-dev-server')) {
transformImport({source}) {
+ console.log('TRANSFORM', source); And then share the result? Specifically, I'm curious if these are catching any files that aren't coming from your codebase. If that's happening, the it could be that Snowpack is trying to serve some code-coverage helper files itself, which would explain the error. |
Here's the output, as requested, using my
|
To clarify, there are only two test files in this project right now.
https://github.com/basham/rx-ui-patterns/blob/master/src/util/use/useValue.test.js |
Hmm, I don't see anything surprising/problematic in that code. It looks like we're only serving your source files and test files, but not any other files. @LarsDenBakker any idea what may be going on here? |
Thanks for pinging me. It looks like one of the libraries we're using for test coverage parsing (https://github.com/istanbuljs/v8-to-istanbul) is returning empty results when using the plugin - possibly because the paths are pointing to |
I've fixed this in However there is still a few problems when doing test coverage with snowpack.
|
I upgraded to
The path is missing the
|
Great, thanks @LarsDenBakker! We’re tracking the remaining work to get sourcemaps working in all cases in #1213 |
I'm trying to get web-test-runner to run code coverage, as outlined in their guide.
When I include the
@snowpack/web-test-runner-plugin
inweb-test-runner.config.js
as recommended in the Snowpack Testing docs, it outputs this to the terminal, and the HTML report is empty:However, when I don't include the plugin in the config, it works as expected. It runs the coverage and the HTML report is built.
I suspect the plugin is somehow blocking the coverage code from executing. How do we resolve this?
I have the latest versions (as of today) of these dependencies installed:
The text was updated successfully, but these errors were encountered: