docs(tests): update test documentation to reflect current test structure and commands

Update README.md in the test directory, including:
- More detailed test type descriptions
- Updated test commands
- Changed frontend testing tool from pytest to Vitest
- Added frontend test directory layout explanation
This commit is contained in:
y-agent-ai committed 2026-03-22 19:17:02 +08:00
1 parent 9b73ce4276
commit 07fe32fa6b
1 file changed
+14 -14
+14 -14
View File
@@ -3,30 +3,30 @@
The test tree is organized with a clear backend/frontend split:
- `tests/backend`
- backend unit tests
- backend integration tests
- backend unit tests, integration tests, and contract tests
- driven by `pytest`
- regression tests directly related to `py-src/data_formulator/**`
- `tests/frontend`
- frontend-related contract tests driven by `pytest`
- focused on request/response boundary behavior
- not intended for React component-level unit tests yet
- frontend unit tests powered by **Vitest** + **@testing-library/react** (jsdom)
- covers pure functions, Redux selectors, and React component rendering
- see `tests/frontend/README.md` for directory layout details
## Suggested Commands
Run all tests:
```bash
pytest
```
Run backend tests only:
Run backend tests (pytest):
```bash
pytest tests/backend
```
Run frontend contract tests only:
Run frontend tests (Vitest):
```bash
pytest tests/frontend
npm test
```
Run frontend tests in watch mode:
```bash
npm run test:watch
```