Skip to content

Commit 54536ce

Browse files
feat: setup Vitest and adding tests
1 parent d1c7c27 commit 54536ce

9 files changed

Lines changed: 1361 additions & 3 deletions

File tree

eslint.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import reactRefresh from 'eslint-plugin-react-refresh'
44
import globals from 'globals'
55
import tseslint from 'typescript-eslint'
66
import stylistic from '@stylistic/eslint-plugin'
7+
import vitest from '@vitest/eslint-plugin'
8+
import testingLibrary from 'eslint-plugin-testing-library'
79

810
export default tseslint.config(
911
{

package.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
"build": "tsc -b && vite build",
99
"lint": "eslint .",
1010
"lint:fix": "eslint . --fix",
11-
"preview": "vite preview"
11+
"preview": "vite preview",
12+
"test": "vitest --run",
13+
"test:watch": "vitest",
14+
"test:coverage": "vitest run --coverage"
1215
},
1316
"dependencies": {
1417
"@mui/material": "^6.4.8",
@@ -22,18 +25,26 @@
2225
"devDependencies": {
2326
"@eslint/js": "^9.23.0",
2427
"@stylistic/eslint-plugin": "^4.2.0",
28+
"@testing-library/jest-dom": "^6.6.3",
29+
"@testing-library/react": "^16.2.0",
30+
"@testing-library/user-event": "^14.6.1",
2531
"@types/node": "^22.13.11",
2632
"@types/react": "^19.0.12",
2733
"@types/react-dom": "^19.0.4",
2834
"@vitejs/plugin-react": "^4.3.4",
35+
"@vitest/coverage-v8": "^3.1.1",
36+
"@vitest/eslint-plugin": "^1.1.39",
2937
"eslint": "^9.23.0",
3038
"eslint-plugin-react": "^7.37.4",
3139
"eslint-plugin-react-hooks": "^5.2.0",
3240
"eslint-plugin-react-refresh": "^0.4.19",
41+
"eslint-plugin-testing-library": "^7.1.1",
3342
"globals": "^16.0.0",
43+
"jsdom": "^26.0.0",
3444
"typescript": "^5.8.2",
3545
"typescript-eslint": "^8.27.0",
36-
"vite": "^6.2.0"
46+
"vite": "^6.2.0",
47+
"vitest": "^3.1.1"
3748
},
3849
"packageManager": "pnpm@10.6.5+sha512.cdf928fca20832cd59ec53826492b7dc25dc524d4370b6b4adbf65803d32efaa6c1c88147c0ae4e8d579a6c9eec715757b50d4fa35eea179d868eada4ed043af"
3950
}

0 commit comments

Comments
 (0)