mirror of
https://github.com/microsoft/data-formulator.git
synced 2026-11-04 12:01:37 +00:00
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:
1 file changed
+14
-14
+14
-14
@@ -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
|
||||
```
|
||||
Reference in new issue
Block a user