Skip to content

feat: add @chromatic-com/vitest, minimal setup#296

Merged
AriPerkkio merged 6 commits intomainfrom
ari/feat-minimal-vitest-integration
Apr 13, 2026
Merged

feat: add @chromatic-com/vitest, minimal setup#296
AriPerkkio merged 6 commits intomainfrom
ari/feat-minimal-vitest-integration

Conversation

@AriPerkkio
Copy link
Copy Markdown
Member

@AriPerkkio AriPerkkio commented Mar 27, 2026

Issue: Related to #295

What Changed

The most minimal implementation required for generating snapshot and archives on file system during test run. Not configurable, controllable or extensible.

How to test

$ cd <project-root>
$ yarn test:unit
$ yarn test:vitest
$ yarn archive-storybook:vitest

Preview release

  • @chromatic-com/vitest@0.0.1-ed4418f-20260330072141

https://github.com/chromaui/chromatic-e2e/actions/runs/23732773313/job/69130090147

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 27, 2026

🦋 Changeset detected

Latest commit: 40f6802

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@chromatic-com/shared-e2e Patch
@chromatic-com/vitest Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment thread packages/vitest/src/browser/setupFile.ts
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 82.52427% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.02%. Comparing base (202b83d) to head (40f6802).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
packages/vitest/src/browser/public/takeSnapshot.ts 57.14% 11 Missing and 1 partial ⚠️
packages/vitest/src/node/commands.ts 93.87% 3 Missing ⚠️
packages/vitest/src/node/plugin.ts 88.88% 2 Missing ⚠️
packages/vitest/src/browser/getCurrentTest.ts 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #296      +/-   ##
==========================================
- Coverage   95.75%   93.02%   -2.73%     
==========================================
  Files          14       19       +5     
  Lines         400      502     +102     
  Branches       68       86      +18     
==========================================
+ Hits          383      467      +84     
- Misses         16       33      +17     
- Partials        1        2       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AriPerkkio AriPerkkio force-pushed the ari/feat-minimal-vitest-integration branch from 5a709e6 to e4f637e Compare March 27, 2026 08:42
@AriPerkkio AriPerkkio marked this pull request as ready for review March 27, 2026 11:51
Comment thread packages/vitest/src/constants.ts Outdated
@AriPerkkio AriPerkkio force-pushed the ari/feat-minimal-vitest-integration branch 3 times, most recently from 7d80b8a to 3d99df6 Compare March 30, 2026 10:39
Comment thread packages/vitest/package.json Outdated
Comment thread packages/vitest/package.json
Comment thread packages/vitest/package.json Outdated
Comment thread packages/vitest/src/browser/public/takeSnapshot.ts
Comment thread packages/vitest/src/browser/getCurrentTest.ts Outdated
Comment thread packages/vitest/src/browser/public/takeSnapshot.ts
@AriPerkkio AriPerkkio requested a review from ndelangen March 30, 2026 12:44
Comment thread packages/vitest/src/node/commands.ts
@AriPerkkio AriPerkkio self-assigned this Mar 31, 2026
@AriPerkkio AriPerkkio force-pushed the ari/feat-minimal-vitest-integration branch from f990c27 to 19fe3bf Compare April 1, 2026 08:36
@AriPerkkio AriPerkkio requested a review from ndelangen April 7, 2026 07:03
Comment thread packages/vitest/src/storybook-config/shared/preview.ts Outdated
@mrmckeb
Copy link
Copy Markdown

mrmckeb commented Apr 12, 2026

Really excited to test this one out!

@AriPerkkio AriPerkkio merged commit 35ded1d into main Apr 13, 2026
8 of 13 checks passed
@AriPerkkio AriPerkkio deleted the ari/feat-minimal-vitest-integration branch April 13, 2026 05: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.

3 participants