mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-03 06:47:33 +00:00
569 B
569 B
Unit Testing Guidelines
Running Tests
- Single file:
pnpm test:unit -- <filename> - All tests:
pnpm test:unit - Wrong Examples:
- Still runs all tests:
pnpm test:unit <filename>
- Still runs all tests:
Testing Approach
- Write tests for new features
- Run single tests for performance
- Follow existing test patterns
Test Structure
- Check @tests-ui/README.md for guidelines
- Use existing test utilities
- Mock external dependencies
Mocking
- Read: https://vitest.dev/api/mock.html
- Critical: Always prefer vitest mock functions over writing verbose manual mocks