Skip to content

Commit

Permalink
setup vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
roushou committed Jul 10, 2024
1 parent 0d6f983 commit 64303bf
Show file tree
Hide file tree
Showing 4 changed files with 958 additions and 1,664 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
"format": "biome format --write .",
"lint": "biome lint --write .",
"lint:unsafe": "biome lint --write --unsafe .",
"test": "jest",
"test:coverage": "jest . --coverage ",
"test": "vitest run",
"test:coverage": "vitest run --coverage",
"test:watch": "vitest",
"test:ui": "vitest --ui",
"release:check": "changeset status --verbose --since=origin/main",
"release:publish": "yarn install && yarn build && changeset publish",
"release:version": "changeset version && yarn install --immutable",
Expand All @@ -39,27 +41,25 @@
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.2",
"@tanstack/react-query": "^5.24.1",
"@testing-library/jest-dom": "^6.4.0",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^14.2.0",
"@types/jest": "^29.5.12",
"@types/react": "^18",
"@types/react-dom": "^18",
"@vitest/ui": "^2.0.1",
"@xmtp/frames-validator": "^0.6.0",
"autoprefixer": "^10.4.19",
"graphql": "^14",
"graphql-request": "^6.1.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-extended": "^4.0.2",
"jsdom": "^24.1.0",
"packemon": "3.3.1",
"permissionless": "^0.1.29",
"react": "^18",
"react-dom": "^18",
"rimraf": "^5.0.5",
"tailwindcss": "^3.4.3",
"ts-jest": "^29.1.2",
"typescript": "~5.3.3",
"viem": "^2.10.5",
"vitest": "^2.0.1",
"wagmi": "^2.8.7"
},
"resolutions": {
Expand Down
9 changes: 9 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
environment: 'jsdom',
setupFiles: ['./vitest.setup.ts'],
globals: true,
},
});
2 changes: 2 additions & 0 deletions vitest.setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import '@testing-library/jest-dom/vitest';
// https://github.com/testing-library/jest-dom#with-vitest
Loading

0 comments on commit 64303bf

Please sign in to comment.