test: add unit tests for test-recorder transform and improve README

- Add 25 colocated unit tests for transform rules and engine
- Add tools/ to vitest include pattern
- Improve README with quick-start prereqs and test instructions
This commit is contained in:
bymyself
2026-04-06 14:25:01 -07:00
parent 9faccf5c18
commit 0959435d53
4 changed files with 263 additions and 6 deletions

View File

@@ -2,15 +2,15 @@
Interactive CLI for recording and transforming Playwright browser tests for ComfyUI.
## Usage
## Quick Start
From the repo root:
**Prerequisites:** Node.js ≥ 20, pnpm, a running ComfyUI backend. See the [Browser Tests README](../../browser_tests/README.md) for detailed environment setup including Playwright installation and backend configuration.
```bash
pnpm comfy-test record # Record a new test
pnpm comfy-test check # Verify your environment is ready
pnpm comfy-test record # Record a new test
pnpm comfy-test transform <file> # Transform raw codegen to conventions
pnpm comfy-test check # Check environment prerequisites
pnpm comfy-test list # List available workflows
pnpm comfy-test list # List available workflows
```
## For QA Testers
@@ -24,3 +24,9 @@ cd tools/test-recorder
pnpm build # Compile TypeScript
pnpm dev # Watch mode
```
Run unit tests from the repo root:
```bash
pnpm test:unit -- tools/test-recorder
```