|
|
@@ -81,12 +81,12 @@ Draft
|
|
|
|
|
|
### 测试策略 [Source: architecture/testing-strategy.md]
|
|
|
- **测试框架**: Vitest + Testing Library + hono/testing + Playwright
|
|
|
-- **测试位置**: `__tests__` 文件夹与源码并列
|
|
|
+- **测试位置**: `tests/` 目录在包根目录下 [Source: architecture/testing-strategy.md#单元测试]
|
|
|
- **覆盖率目标**: 核心业务逻辑 > 80%
|
|
|
- **测试类型**: 单元测试、集成测试、E2E测试
|
|
|
- **业务模块包测试位置**:
|
|
|
- - 单元测试:`packages/*-module/tests/unit/**/*.test.ts`
|
|
|
- - 集成测试:`packages/*-module/tests/integration/**/*.test.ts`
|
|
|
+ - 单元测试:`packages/*-module/tests/unit/**/*.test.ts` [Source: architecture/testing-strategy.md#单元测试]
|
|
|
+ - 集成测试:`packages/*-module/tests/integration/**/*.test.ts` [Source: architecture/testing-strategy.md#集成测试]
|
|
|
- **测试执行命令**:
|
|
|
- 运行所有测试:`cd packages/user-module && pnpm test`
|
|
|
- 运行单元测试:`cd packages/user-module && pnpm test:unit`
|
|
|
@@ -141,7 +141,7 @@ Draft
|
|
|
## Testing
|
|
|
### 测试标准 [Source: architecture/testing-strategy.md]
|
|
|
- **测试框架**: Vitest
|
|
|
-- **测试位置**: `__tests__` 文件夹与源码并列
|
|
|
+- **测试位置**: `tests/` 目录在包根目录下 [Source: architecture/testing-strategy.md#单元测试]
|
|
|
- **覆盖率目标**: 核心业务逻辑 > 80%
|
|
|
- **测试类型**: 单元测试、集成测试
|
|
|
|