Skip to content

Commit 92ee027

Browse files
chore(mobile): 新增测试框架配置——jsdom环境 + @testing-library依赖
1 parent e9171cc commit 92ee027

3 files changed

Lines changed: 24 additions & 5 deletions

File tree

app/mobile/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"@agenthub/shared": "workspace:*",
1818
"@tanstack/react-query": "^5.100.14",
1919
"@tauri-apps/api": "^2.5.0",
20-
"@tauri-apps/plugin-shell": "^2.2.0",
2120
"@tauri-apps/plugin-notification": "^2.2.0",
21+
"@tauri-apps/plugin-shell": "^2.2.0",
2222
"clsx": "^2.1.1",
2323
"i18next": "^26.2.0",
2424
"lucide-react": "^1.16.0",
@@ -29,9 +29,12 @@
2929
},
3030
"devDependencies": {
3131
"@tauri-apps/cli": "^2.5.0",
32+
"@testing-library/jest-dom": "^6.9.1",
33+
"@testing-library/react": "^16.3.2",
3234
"@types/react": "^19.1.0",
3335
"@types/react-dom": "^19.1.0",
3436
"@vitejs/plugin-react": "^4.4.0",
37+
"jsdom": "^29.1.1",
3538
"typescript": "~5.8.0",
3639
"vite": "^6.3.0",
3740
"vitest": "^4.1.7"

app/mobile/vite.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,8 @@ export default defineConfig({
1717
port: 5174,
1818
strictPort: true,
1919
},
20+
test: {
21+
environment: "jsdom",
22+
globals: true,
23+
},
2024
});

app/pnpm-lock.yaml

Lines changed: 16 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)