Skip to content

test(coverage): refactor testing structure#5837

Merged
AriPerkkio merged 2 commits intovitest-dev:mainfrom
AriPerkkio:test/coverage-refactor
Jun 24, 2024
Merged

test(coverage): refactor testing structure#5837
AriPerkkio merged 2 commits intovitest-dev:mainfrom
AriPerkkio:test/coverage-refactor

Conversation

@AriPerkkio
Copy link
Member

@AriPerkkio AriPerkkio commented Jun 4, 2024

Description

Refactors coverage tests similarly as done for others in #5600. The current coverage tests are a bit of mess.

Most coverage tests will need a way to change coverage options and verify the output. For this we'll need to use Vitest Node APIs. Vitest Workspaces is used to change coverage providers and browser mode. Tests themselves configure different coverage options that are being tested.

Includes fix from #5954 so let's merge that one first.

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 force-pushed the test/coverage-refactor branch 9 times, most recently from ba94174 to 2ddccd2 Compare June 11, 2024 10:56
@AriPerkkio AriPerkkio force-pushed the test/coverage-refactor branch 3 times, most recently from 76b7cd3 to 0599c82 Compare June 19, 2024 07:24
@AriPerkkio AriPerkkio force-pushed the test/coverage-refactor branch 16 times, most recently from 960f60c to 86a0863 Compare June 22, 2024 08:03
@AriPerkkio AriPerkkio force-pushed the test/coverage-refactor branch 7 times, most recently from 272b808 to e943cf4 Compare June 23, 2024 13:30
@AriPerkkio AriPerkkio marked this pull request as ready for review June 23, 2024 13:30
@AriPerkkio AriPerkkio force-pushed the test/coverage-refactor branch from e943cf4 to 0fcc708 Compare June 23, 2024 13:34
@AriPerkkio
Copy link
Member Author

AriPerkkio commented Jun 23, 2024

Let's first merge #5954

@AriPerkkio AriPerkkio force-pushed the test/coverage-refactor branch from 0fcc708 to 3dcef9e Compare June 23, 2024 15:34
@AriPerkkio AriPerkkio merged commit 19e9bab into vitest-dev:main Jun 24, 2024
@AriPerkkio AriPerkkio deleted the test/coverage-refactor branch June 24, 2024 07:31
AriPerkkio added a commit to AriPerkkio/vitest that referenced this pull request Jun 24, 2024
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