test: configure Vitest testing framework

- Add vitest, @testing-library/react, @vitest/ui, jsdom dependencies
- Create vitest.config.ts with jsdom environment and coverage settings
- Add tests/setup.ts with localStorage mock and crypto mock
- Add tests/gateway/ws-client.test.ts for GatewayClient unit tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
iven
2026-03-12 00:48:58 +08:00
parent b8a83b5a26
commit 1d831fb286
5 changed files with 1400 additions and 3 deletions

View File

@@ -12,7 +12,14 @@
"gateway:status": "openclaw status",
"gateway:doctor": "openclaw doctor"
},
"keywords": ["ai", "agent", "openclaw", "tauri", "feishu", "chinese-models"],
"keywords": [
"ai",
"agent",
"openclaw",
"tauri",
"feishu",
"chinese-models"
],
"author": "ZCLAW Team",
"license": "MIT",
"dependencies": {
@@ -20,10 +27,15 @@
"zod": "^3.22.0"
},
"devDependencies": {
"@testing-library/react": "^16.3.2",
"@types/node": "^20.11.0",
"@types/ws": "^8.5.10",
"typescript": "^5.3.0",
"@vitejs/plugin-react": "^5.1.4",
"@vitest/ui": "^4.0.18",
"jest": "^29.7.0",
"jsdom": "^28.1.0",
"tsx": "^4.7.0",
"jest": "^29.7.0"
"typescript": "^5.3.0",
"vitest": "^4.0.18"
}
}