summaryrefslogtreecommitdiff
path: root/package.json
diff options
context:
space:
mode:
authorKatiaLiu <k1158113341@163.com>2026-03-25 23:23:26 +0800
committerGitHub <noreply@github.com>2026-03-25 23:23:26 +0800
commitb7f0a046e30916545cc7bf62238f48285b6699c2 (patch)
treee5b012cc17ab529a3c1c6eaef9ed1a44da1773e6 /package.json
parent74a4c4a2b7583747fe358bc899f4d012e958dc4e (diff)
Add Vitest testing setup and Button component tests (#11)
* Add Vitest testing setup and Button component tests - Install Vitest and related dependencies - Configure Vitest with React support - Create Button component test cases - Add test scripts to package.json - Create TESTING.md documentation - Update test comments to English for consistency * Update package.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Bertrand Yuan <yuanweijie1456@outlook.com> * Update package.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Bertrand Yuan <yuanweijie1456@outlook.com> * remove TESTING.md for the moment There are many parts not matched with current content. Signed-off-by: Bertrand Yuan <me@bertyuan.com> --------- Signed-off-by: Bertrand Yuan <yuanweijie1456@outlook.com> Signed-off-by: Bertrand Yuan <me@bertyuan.com> Co-authored-by: Bertrand Yuan <me@bertyuan.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Bertrand Yuan <bert.yuan@outlook.com>
Diffstat (limited to 'package.json')
-rw-r--r--package.json14
1 files changed, 12 insertions, 2 deletions
diff --git a/package.json b/package.json
index a3bb1cb..d3155a3 100644
--- a/package.json
+++ b/package.json
@@ -26,7 +26,10 @@
"payload:migrate:create": "payload migrate:create",
"email:build": "email build",
"email:dev": "email dev -p 3001",
- "email:export": "email export"
+ "email:export": "email export",
+ "test": "vitest run",
+ "test:watch": "vitest watch",
+ "test:coverage": "vitest run --coverage"
},
"dependencies": {
"@fuma-comment/react": "^1.2.1",
@@ -88,21 +91,28 @@
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@tailwindcss/postcss": "4.1.18",
+ "@testing-library/dom": "^10.4.1",
+ "@testing-library/jest-dom": "^6.9.1",
+ "@testing-library/react": "^16.3.2",
"@types/mdx": "2.0.13",
"@types/node": "22.13.1",
"@types/pg": "^8.16.0",
"@types/react": "19.0.8",
"@types/react-dom": "19.0.3",
"@types/rss": "^0.0.32",
+ "@vitejs/plugin-react": "^4.2.1",
"drizzle-kit": "^0.30.6",
"fast-glob": "^3.3.3",
"gray-matter": "^4.0.3",
+ "jsdom": "^20.0.0",
"next-validate-link": "^1.5.2",
"postcss": "8.5.1",
"react-email": "^4.0.2",
"tailwindcss": "4.1.18",
"tsx": "^4.19.3",
- "typescript": "5.7.3"
+ "typescript": "5.7.3",
+ "vitest": "^3.0.0",
+ "@vitest/coverage-v8": "^3.0.0"
},
"ct3aMetadata": {
"initVersion": "7.39.0"