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

Option to save report in a single combined HTML file #6425

Open
4 tasks done
man-of-seafood opened this issue Aug 29, 2024 · 0 comments
Open
4 tasks done

Option to save report in a single combined HTML file #6425

man-of-seafood opened this issue Aug 29, 2024 · 0 comments
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)

Comments

@man-of-seafood
Copy link

Clear and concise description of the problem

In our CI pipeline, we generate HTML reports using @vitest/ui. Our pipeline is designed to handle self-contained files, meaning that all assets (scripts, styles, etc.) must be embedded directly within the HTML report. Currently, the generated reports include external asset references, which our pipeline cannot process correctly due to its requirement for single-file artifacts.

Suggested solution

We would like to request an option in @vitest/ui to generate fully self-contained HTML reports. This feature would inline all necessary assets into the HTML file, producing a single self-contained file that is more easily portable.

Alternative

  • Trying to make the multi-file structure work in our CI - with the config available in our CI, I've attempted to upload all the report files (i.e. all of html/), but the the original directory structure isn't preserved; all assets end up at $s3Host.$file. Potentially, an option to fully customize the src attribute to the needed assets could also solve this, but I feel that a self-contained report is ultimately the better option.

Additional context

Here's a similar issue for a jest plugin: Hazyzh/jest-html-reporters#184

Validations

@sheremet-va sheremet-va added p2-nice-to-have Not breaking anything but nice to have (priority) and removed enhancement: pending triage labels Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
None yet
Development

No branches or pull requests

2 participants