Skip to content

Commit d9b1ff0

Browse files
feat: setup Vitest and adding tests
1 parent bda4ee1 commit d9b1ff0

File tree

9 files changed

+1361
-3
lines changed

9 files changed

+1361
-3
lines changed

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
"@emotion/react": "^11.14.0",
@@ -25,18 +28,26 @@
2528
"devDependencies": {
2629
"@eslint/js": "^9.23.0",
2730
"@stylistic/eslint-plugin": "^4.2.0",
31+
"@testing-library/jest-dom": "^6.6.3",
32+
"@testing-library/react": "^16.2.0",
33+
"@testing-library/user-event": "^14.6.1",
2834
"@types/node": "^22.13.11",
2935
"@types/react": "^19.0.12",
3036
"@types/react-dom": "^19.0.4",
3137
"@vitejs/plugin-react": "^4.3.4",
38+
"@vitest/coverage-v8": "^3.1.1",
39+
"@vitest/eslint-plugin": "^1.1.39",
3240
"eslint": "^9.23.0",
3341
"eslint-plugin-react": "^7.37.4",
3442
"eslint-plugin-react-hooks": "^5.2.0",
3543
"eslint-plugin-react-refresh": "^0.4.19",
44+
"eslint-plugin-testing-library": "^7.1.1",
3645
"globals": "^16.0.0",
46+
"jsdom": "^26.0.0",
3747
"typescript": "^5.8.2",
3848
"typescript-eslint": "^8.27.0",
39-
"vite": "^6.2.0"
49+
"vite": "^6.2.0",
50+
"vitest": "^3.1.1"
4051
},
4152
"packageManager": "[email protected]+sha512.cdf928fca20832cd59ec53826492b7dc25dc524d4370b6b4adbf65803d32efaa6c1c88147c0ae4e8d579a6c9eec715757b50d4fa35eea179d868eada4ed043af"
4253
}

0 commit comments

Comments
 (0)