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

HTML reporter unusable when hosted with relative pathnames #3219

Closed
6 tasks done
sannajammeh opened this issue Apr 20, 2023 · 3 comments
Closed
6 tasks done

HTML reporter unusable when hosted with relative pathnames #3219

sannajammeh opened this issue Apr 20, 2023 · 3 comments
Labels
feat: ui Vitest UI

Comments

@sannajammeh
Copy link

Describe the bug

We are deploying all our test reports to github pages in different directories.

/report-integration - shows vitest
/report-e2e - shows playwright html report

The issue we are facing is that Vitest HTML report requires pathname to empty. Eg sannajammeh.github.io/. So when deployed to sannajammeh.github.io/report-integration, the UI is a complete black screen.

I tested this during development as well. Using npx vite preview --outDir ./reports serves without a pathname successfully and the tests show. When opening an HTML server using Live Server in vscode from the testing directory, the pathname is set at <live server host>/reports. Vitest loads all JS files successfully, even the gzipped test data, yet shows a black screen with no tests.

Reproduction

I think the description suffices. There is no way to reproduce with an example without hosting to a specific pathname.

System Info

System:
    OS: macOS 13.2
    CPU: (8) x64 Apple M1
    Memory: 19.38 MB / 8.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 19.9.0 - ~/Library/pnpm/node
    Yarn: 1.22.11 - /usr/local/bin/yarn
    npm: 9.6.3 - ~/Library/pnpm/npm
    Watchman: 2023.02.20.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 112.0.5615.121
    Firefox Developer Edition: 108.0
    Safari: 16.3
  npmPackages:
    @vitest/ui: ^0.30.1 => 0.30.1 
    vite: ^4.3.0 => 4.3.0 
    vitest: ^0.30.1 => 0.30.1

Used Package Manager

pnpm

Validations

@sannajammeh
Copy link
Author

Is there anything missing for some feedback on this one?

@davidbonnet
Copy link

Duplicated by #3481, which has a linked pull request #3487.

@sannajammeh
Copy link
Author

Closing in favor of #3481

@sannajammeh sannajammeh closed this as not planned Won't fix, can't repro, duplicate, stale Jun 16, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jul 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feat: ui Vitest UI
Projects
None yet
Development

No branches or pull requests

3 participants