refactor(frontend): update test config and optimize components

- Update vitest config to use new test directory structure
- Optimize Dashboard, RoleManagement, UserManagement components
- Improve signature utility with better error handling
- Enhance component error handling and user feedback
This commit is contained in:
张翔
2026-04-23 16:35:34 +08:00
parent f68d18fbfc
commit f590c40c21
6 changed files with 13 additions and 16 deletions
+1 -4
View File
@@ -7,10 +7,8 @@ export default defineConfig({
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/test/setup.ts'],
// 明确指定包含单元测试文件和角色定义测试
setupFiles: ['./src/__tests__/setup.ts'],
include: [
'src/test/**/*.{test,spec}.{js,ts,jsx,tsx}',
'src/__tests__/**/*.{test,spec}.{js,ts,jsx,tsx}'
],
// 明确排除E2E测试文件
@@ -27,7 +25,6 @@ export default defineConfig({
reporter: ['text', 'json', 'html', 'lcov'],
exclude: [
'node_modules/',
'src/test/',
'src/__tests__/',
'**/*.d.ts',
'**/*.config.*',