Add frontend unit tests

- Set up Vitest with React Testing Library
- Add comprehensive tests for Button and ListPane components
- Configure TypeScript for test environment
- Add test type declarations

Co-Authored-By: ashwin@anthropic.com <ashwin@anthropic.com>
This commit is contained in:
Devin AI
2025-01-16 19:24:51 +00:00
parent 98e6f0e5ec
commit ce7f65b5be
9 changed files with 165 additions and 4 deletions

View File

@@ -18,7 +18,8 @@
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview"
"preview": "vite preview",
"test": "vitest run"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.0.3",
@@ -40,6 +41,8 @@
},
"devDependencies": {
"@eslint/js": "^9.11.1",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.2.0",
"@types/node": "^22.7.5",
"@types/react": "^18.3.10",
"@types/react-dom": "^18.3.0",
@@ -50,10 +53,12 @@
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.12",
"globals": "^15.9.0",
"jsdom": "^26.0.0",
"postcss": "^8.4.47",
"tailwindcss": "^3.4.13",
"typescript": "^5.5.3",
"typescript-eslint": "^8.7.0",
"vite": "^5.4.8"
"vite": "^5.4.8",
"vitest": "^3.0.0"
}
}