modernweb-dev / web

Guides, tools and libraries for modern web development.
https://modern-web.dev
MIT License
2.22k stars 289 forks source link

WTR coverage generates broken reports when used with snowpack #1312

Open Manish3323 opened 3 years ago

Manish3323 commented 3 years ago

As web test runner uses istanbul to lookup for source file. after generating the coverage results.. i am unable to view the coverage report as the files are being served via in-memory location _dist_ folder (snowpack serve's it from there on dev mode).. however istanbul expects the file to be present on fs. Hopefully, the following Screenshot explains what i am trying to say.

Screenshot 2021-02-23 at 1 38 37 PM
LarsDenBakker commented 3 years ago

You need to turn on source maps in snowpack so that the files can be mapped back to their original paths. However there are some snowpack plugins, like Svelte, which create broken source maps.

Manish3323 commented 3 years ago

The sourcemap config in snowpack is still in experimental. i guess this would get fixed automatically, once it is stable. i will have to wait till then.. Thanks for replying!! Snowpack's doc for source map I'll keep this issue open till then, if u have no issues with it.