chore(jest-serializer): migrate from jest to vitest#940
Merged
layershifter merged 2 commits intoMay 6, 2026
Conversation
- Replace jest.config.ts with vitest.config.mts; jest.setup.ts with vitest.setup.ts
- Switch project test target to @nx/vitest:test
- Update tsconfig.spec.json types to vitest
- Replace \`@testing-library/jest-dom\` setup with \`@testing-library/jest-dom/vitest\`
(the dedicated vitest entry point registers the matchers via vitest's expect.extend)
- Add explicit \`import { describe, it, expect } from 'vitest'\` in the test (matching @griffel/core style)
- Inline snapshots regenerated in vitest's format (\`Object\` framing dropped)
- Allow vitest.setup.ts under the existing \`import-x/no-extraneous-dependencies: off\`
scope in the root eslint config (parallel to jest.setup.ts)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
📊 Bundle size report✅ No changes found |
5 tasks
miroslavstastny
approved these changes
May 6, 2026
layershifter
added a commit
to layershifter/griffel
that referenced
this pull request
May 7, 2026
All packages have been migrated to vitest (microsoft#935-microsoft#940). This drops the jest runtime entirely: - Remove root jest.config.ts and jest.preset.js - Remove @nx/jest:jest target config from nx.json - Drop devDependencies: @nx/jest, @types/jest, babel-jest, eslint-plugin-jest, jest, jest-chrome, jest-environment-jsdom, jest-util, ts-jest - Drop the eslint-plugin-jest plugin and its no-focused-tests rule registration from the root eslint config - Drop **/jest.setup.{js,ts} from the root eslint config's no-extraneous-dependencies override scope - Drop **/jest.config.js from beachball ignorePatterns - Update lockfile Note: this PR depends on microsoft#935, microsoft#936, microsoft#937, microsoft#938, microsoft#939, microsoft#940 — merge those first. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
layershifter
added a commit
that referenced
this pull request
May 7, 2026
* chore: remove jest, ts-jest, @nx/jest, and related dev dependencies All packages have been migrated to vitest (#935-#940). This drops the jest runtime entirely: - Remove root jest.config.ts and jest.preset.js - Remove @nx/jest:jest target config from nx.json - Drop devDependencies: @nx/jest, @types/jest, babel-jest, eslint-plugin-jest, jest, jest-chrome, jest-environment-jsdom, jest-util, ts-jest - Drop the eslint-plugin-jest plugin and its no-focused-tests rule registration from the root eslint config - Drop **/jest.setup.{js,ts} from the root eslint config's no-extraneous-dependencies override scope - Drop **/jest.config.js from beachball ignorePatterns - Update lockfile Note: this PR depends on #935, #936, #937, #938, #939, #940 — merge those first. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore(devtools): use explicit vitest imports @types/jest was previously providing global describe/it/expect types for @griffel/devtools' tests. With it removed, switch the tests to explicit `import { describe, it, expect, vi } from 'vitest'` and drop the now-unused `vitest/globals` types entry / `globals: true` from vite.config.ts — matching @griffel/core's style. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Change files --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
🤖 Generated with Claude Code