定义全栈应用程序的全面测试方法:
E2E Tests
/ \\
Integration Tests
/ \\
Frontend Unit Backend Unit
前端测试:
apps/admin/tests/
├── unit/ # 单元测试
├── components/ # 组件测试
├── hooks/ # Hook测试
└── __mocks__/ # 测试mock
后端测试:
apps/api/tests/
├── unit/ # 单元测试
├── integration/ # 集成测试
└── __mocks__/ # 测试mock
E2E测试:
tests/e2e/
├── auth/ # 认证流程测试
├── users/ # 用户管理测试
└── support/ # 测试支持