-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
How should I configure my custom reporter in Vitest UI? #7354
Comments
This is not possible. The vitest/packages/ui/node/index.ts Lines 67 to 102 in 9e40437
vitest/packages/ui/node/index.ts Lines 30 to 52 in 9e40437
|
When configuring an HTML reporter, if I also configure my own custom HTML reporter, it can overwrite the previous HTML report. https://github.com/canyon-project/canyon-test/blob/main/vitest.config.ts#L10 |
That actually works by accident - the reporters are looped in the order they are defined in configuration. If you are saving the reports in same directory as built-in vitest/packages/coverage-v8/src/provider.ts Lines 129 to 138 in 9e40437
I think we should have a better solution for this. Maybe something like import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
ui: {
coverageDirectory: "/somepath"
}
},
}); ... and if that's defined, use it instead of trying to resolve the path from coverage options. |
Clear and concise description of the problem
This is our custom HTML reporter, and I want to use it in the coverage section of Vitest UI.
Suggested solution
It is recommended to configure the coverage reporter for coverage reports.
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: