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

Update vitest to 1.0.4 #318

Merged
merged 2 commits into from
Dec 17, 2023
Merged

Update vitest to 1.0.4 #318

merged 2 commits into from
Dec 17, 2023

Conversation

davelosert
Copy link
Owner

@davelosert davelosert commented Dec 17, 2023

This pull request primarily updates the usage of the vitest tool across various files, and upgrades the version of vitest and @vitest/coverage-v8 in package.json. The changes ensure that the --coverage flag is replaced with --coverage.enabled true when running vitest, and the coverage report format is updated in vite.config.mjs.

It also explains and fixes #314

Key changes include:

Updates to vitest usage:

  • README.md: The vitest command is updated in three places to use the --coverage.enabled true flag instead of the --coverage flag. [1] [2] [3]
  • package.json: The test:coverage script is updated to use the --coverage.enabled true flag.

Updates to vitest and @vitest/coverage-v8 versions:

  • package.json: The versions of vitest and @vitest/coverage-v8 are upgraded.

Updates to coverage report format:

  • vite.config.mjs: The coverage reporter format is updated from ['text', 'json-summary', 'json'] to ['text-summary', 'json-summary', 'json'].

Copy link
Contributor

Coverage Report for Mock Reports (./test/mockReports)

Status Category Percentage Covered / Total
🔵 Lines 41.37% 60 / 145
🔵 Statements 41.33% 62 / 150
🔵 Functions 62.06% 18 / 29
🔵 Branches 39.65% 23 / 58
File CoverageNo changed files found.
Generated in workflow #618

Copy link
Contributor

Coverage Report for Root

Status Category Percentage Covered / Total
🔵 Lines 52.58% 387 / 736
🔵 Statements 52.58% 387 / 736
🔵 Functions 73.68% 14 / 19
🔵 Branches 90% 63 / 70
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Unchanged Files
src/FileCoverageMode.ts 100% 100% 100% 100%
src/generateFileCoverageHtml.ts 100% 100% 100% 100%
src/generateFileUrl.ts 94.44% 50% 100% 94.44% 6
src/generateHeadline.ts 100% 100% 100% 100%
src/generateSummaryTableHtml.ts 100% 100% 100% 100%
src/getPullChanges.ts 0% 0% 0% 0% 1-58
src/getUncoveredLinesFromStatements.ts 100% 100% 100% 100%
src/getViteConfigPath.ts 98.03% 87.5% 100% 98.03% 39
src/icons.ts 100% 100% 100% 100%
src/index.ts 0% 0% 0% 0% 1-80
src/options.ts 0% 0% 0% 0% 1-35
src/parseCoverageThresholds.ts 100% 100% 100% 100%
src/parseJsonReports.ts 0% 0% 0% 0% 1-50
src/writeSummaryToPR.ts 0% 0% 0% 0% 1-124
Generated in workflow #618

@davelosert davelosert merged commit 1bf61ac into main Dec 17, 2023
1 check passed
Copy link
Contributor

🎉 This PR is included in version 2.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@davelosert davelosert deleted the update-vitest branch December 18, 2023 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fail when coverage is not met
1 participant