Skip to content
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

[report/html-spa] Incorrect placement of root index.html when there's only one top level folder #740

Open
rudwna opened this issue Aug 25, 2023 · 0 comments

Comments

@rudwna
Copy link

rudwna commented Aug 25, 2023

When running coverage report with html-spa reporter (through jest) and there's more than one top-level directory for example:

/src
/test

The output index.html location will be correct (inside the default /coverage function for jest) that is: /coverage/index.html.

But if I excluded the /test folder from collecting coverage, the output index.html will be inside the /src folder, that is: /coverage/src/index.html. Which if open, will not be able to find the top-level resource(CSS, JS) but if I manually move the file to /coverage/index.html it'll works.

Also I observe that after I move the file and open it, the directory seems to be flattened. For example, instead of seeing an entry for /src/app.ts, I only see app.ts

version:

jest: 27.5.1
istanbul-reports 3.1.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant