bencodezen / vue-enterprise-boilerplate

An ever-evolving, very opinionated architecture and dev environment for new Vue SPA projects using Vue CLI.
7.78k stars 1.32k forks source link

coverage report is getting 404 #82

Closed genu closed 5 years ago

genu commented 5 years ago

When I generate a coverage report and navigate through it I get a 404 when I click on a source file.

image

chrisvfritz commented 5 years ago

The unit coverage report is not actually part of your app, so shouldn't be accessible for a local server like localhost:5000. Instead, it's bundled into tests/unit/coverage/lcov-report. To view it, you'll actually want to open tests/unit/coverage/lcov-report/index.html with the file:// protocol, which is usually the default behavior for opening a local HTML file. Then all the links should work. 🙂

Does that make sense?

genu commented 5 years ago

What I did, is, I used server or live-server package to serve the coverage folder.

You're right, the coverage should not be served through a server, but accessed directly.

That was the issue.

We can close this (maybe a note should exist somewhere about this behavior?)