Skip to content

Commit

Permalink
feat: replace Jest by Vitest for better DX
Browse files Browse the repository at this point in the history
  • Loading branch information
ixartz committed May 18, 2024
1 parent 6643efe commit 2504504
Show file tree
Hide file tree
Showing 10 changed files with 1,131 additions and 402 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
// Configuration for testing
{
"files": ["**/*.test.ts", "**/*.test.tsx"],
"plugins": ["jest", "jest-formatting", "testing-library", "jest-dom"],
"plugins": ["vitest", "jest-formatting", "testing-library", "jest-dom"],
"extends": [
"plugin:jest/recommended",
"plugin:vitest/recommended",
"plugin:jest-formatting/recommended",
"plugin:testing-library/react",
"plugin:jest-dom/recommended"
Expand Down
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"mikestead.dotenv",
"csstools.postcss",
"bradlc.vscode-tailwindcss",
"Orta.vscode-jest",
"vitest.explorer",
"humao.rest-client",
"yoavbls.pretty-ts-errors",
"ms-playwright.playwright",
Expand Down
12 changes: 1 addition & 11 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,7 @@
"lucide-react"
],
"typescript.preferences.preferTypeOnlyAutoImports": true, // Prefer type-only imports
"jest.runMode": {
"type": "on-save",
"testFileOnly": true,
"coverage": true
}, // Configure Jest extension
"jest.outputConfig": {
"revealOn": "error",
"revealWithFocus": "test-results",
"clearOnRun": "none"
}, // Switch to test-results view when test fails
"testing.openTesting": "neverOpen", // For a consistent Jest output experience, the simplest solution is to set to "neverOpen"
"testing.openTesting": "neverOpen", // Don't open the testing view automatically when running tests
// Multiple language settings for json and jsonc files
"[json][jsonc][yaml]": {
"editor.formatOnSave": true,
Expand Down
40 changes: 0 additions & 40 deletions jest.config.ts

This file was deleted.

7 changes: 0 additions & 7 deletions jest.setup.ts

This file was deleted.

Loading

0 comments on commit 2504504

Please sign in to comment.