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

Add @vitest/coverage-v8 to vitest generator #17886

Closed
1 task done
mpgregson opened this issue Jun 30, 2023 · 2 comments · Fixed by #18114
Closed
1 task done

Add @vitest/coverage-v8 to vitest generator #17886

mpgregson opened this issue Jun 30, 2023 · 2 comments · Fixed by #18114
Labels
outdated scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx type: feature

Comments

@mpgregson
Copy link
Contributor

mpgregson commented Jun 30, 2023

Description

Add support for @vitest/coverage-v8 in packages/vite/src/generators/vitest/vitest-generator.ts and default to v8

Motivation

@vitest/coverage-c8 is the current default, but this is now deprecated.

Suggested Implementation (replace c8 with v8)

Update the VitestGeneratorSchema.coverageProvider, replace 'c8' with 'v8'
Update the vitest generator so that it adds @vitest/coverage-v8 instead of @vitest/coverage-c8 to the package.json
Add vitestCoverageV8Version export to packages/vite/src/utils/versions.ts
Remove vitestCoverageC8Version export from packages/vite/src/utils/versions.ts

Alternate Implementations (add and default to v8)

Update the VitestGeneratorSchema.coverageProvider type to include 'v8'
Update the vitest generator so that it adds the correct dependency to package.json depending on the coverageProvider chosen.
Add vitestCoverageV8Version export to packages/vite/src/utils/versions.ts

@FrozenPandaz FrozenPandaz added scope: bundlers Issues related to webpack, rollup scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx and removed scope: bundlers Issues related to webpack, rollup labels Jun 30, 2023
@louiss0
Copy link

louiss0 commented Jul 10, 2023

Glad this issue is up

mpgregson added a commit to mpgregson/nx that referenced this issue Jul 14, 2023
mpgregson added a commit to mpgregson/nx that referenced this issue Jul 14, 2023
mpgregson added a commit to mpgregson/nx that referenced this issue Jul 14, 2023
mpgregson added a commit to mpgregson/nx that referenced this issue Jul 26, 2023
mpgregson added a commit to mpgregson/nx that referenced this issue Jul 26, 2023
mpgregson added a commit to mpgregson/nx that referenced this issue Jul 27, 2023
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx type: feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants