mirror of
https://github.com/langgenius/dify.git
synced 2026-04-05 16:50:39 +08:00
refactor(web): move component tests into sibling __tests__ directories (#33623)
Co-authored-by: CodingOnStar <hanxujiang@dify.com>
This commit is contained in:
@@ -9,7 +9,8 @@ When I ask you to write/refactor/fix tests, follow these rules by default.
|
||||
- **Framework**: Next.js 15 + React 19 + TypeScript
|
||||
- **Testing Tools**: Vitest 4.0.16 + React Testing Library 16.0
|
||||
- **Test Environment**: jsdom
|
||||
- **File Naming**: `ComponentName.spec.tsx` (same directory as component)
|
||||
- **File Naming**: `ComponentName.spec.tsx` inside a same-level `__tests__/` directory
|
||||
- **Placement Rule**: Component, hook, and utility tests must live in a sibling `__tests__/` folder at the same level as the source under test. For example, `foo/index.tsx` maps to `foo/__tests__/index.spec.tsx`, and `foo/bar.ts` maps to `foo/__tests__/bar.spec.ts`.
|
||||
|
||||
## Running Tests
|
||||
|
||||
|
||||
Reference in New Issue
Block a user