Skip to content

Conversation

@AriPerkkio
Copy link
Member

Description

Compare coverage summaries instead of coverage maps.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

@AriPerkkio AriPerkkio requested a review from Copilot March 29, 2025 16:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request refactors the coverage snapshot tests to compare coverage summaries rather than full coverage maps.

  • Updates the pre-transpiled source test to use inline snapshots for verifying the list of files and file coverage details.
  • Modifies the bundled sources test to import and use a new summary formatting function and verifies coverage summaries via inline snapshots.

Reviewed Changes

Copilot reviewed 2 out of 6 changed files in this pull request and generated no comments.

File Description
test/coverage-test/test/pre-transpiled-source.test.ts Replaces multiple file-existence assertions with an inline snapshot, and adds inline snapshots for file coverage details based on coverage provider.
test/coverage-test/test/bundled-sources.test.ts Updates import statements to include formatSummary; replaces multiple file-existence assertions with an inline snapshot; and validates coverage summaries for bundled sources across providers.
Files not reviewed (4)
  • test/coverage-test/test/snapshots/bundled-istanbul.snapshot.json: Language not supported
  • test/coverage-test/test/snapshots/bundled-v8.snapshot.json: Language not supported
  • test/coverage-test/test/snapshots/pre-transpiled-istanbul.snapshot.json: Language not supported
  • test/coverage-test/test/snapshots/pre-transpiled-v8.snapshot.json: Language not supported

@netlify
Copy link

netlify bot commented Mar 29, 2025

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 98df712
🔍 Latest deploy log https://app.netlify.com/sites/vitest-dev/deploys/67e81ccb04f4b20008680b29
😎 Deploy Preview https://deploy-preview-7762--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@AriPerkkio AriPerkkio merged commit 279f57b into vitest-dev:main Mar 30, 2025
12 of 13 checks passed
@AriPerkkio AriPerkkio deleted the test/refactor-coverage-snapshots branch March 30, 2025 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants