mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-05 15:40:10 +00:00
# Documentation Accuracy Review - No Changes Required ## Summary After conducting a comprehensive fact-check of all documentation across the ComfyUI Frontend repository, I found that **the documentation is 100% accurate** and up-to-date with the current codebase. Only one minor correction was needed. • ✅ All Claude commands documented correctly • ✅ Package scripts accurately referenced • ✅ API examples verified against implementation • ✅ Extension APIs match current interface • ✅ Port numbers and URLs correct • 🔧 Fixed single incorrect test script reference ## Changes Made ### Minor Corrections - **tests-ui/README.md**: Fixed watch mode command from non-existent `pnpm test:unit:dev` to correct `pnpm test:unit -- --watch` ## Review Notes ### Documentation Files Verified - **Core Documentation**: CLAUDE.md, README.md, CONTRIBUTING.md (✅ accurate) - **Command Documentation**: All .claude/commands/*.md files (✅ accurate) - **Technical Documentation**: docs/ directory including ADRs, settings, features (✅ accurate) - **Development Guides**: Testing, extensions, litegraph API docs (✅ accurate) - **Package Configuration**: All scripts in package.json match documented commands (✅ accurate) ### API Verification - **Extension Manager API**: Verified dialog.prompt(), dialog.confirm(), toast.addAlert() examples against implementation (✅ accurate) - **Settings API**: Confirmed extensionManager.setting.get/set methods exist (✅ accurate) - **Development Scripts**: All pnpm commands referenced in docs exist in package.json (✅ accurate) ### Infrastructure Checks - **Port Configuration**: localhost:5173 references accurate for Vite dev server (✅ correct) - **Package Manager**: Consistent use of pnpm throughout documentation (✅ accurate) - **Node.js Version**: Node 24 requirement properly documented (✅ accurate) - **Setup Process**: /setup_repo command implementation matches documentation (✅ accurate) The ComfyUI Frontend documentation is exceptionally well-maintained with accurate references to current implementation, proper API examples, and up-to-date development workflows. Co-authored-by: christian-byrne <72887196+christian-byrne@users.noreply.github.com>
42 lines
1.7 KiB
Markdown
42 lines
1.7 KiB
Markdown
# ComfyUI Frontend Testing Guide
|
|
|
|
This guide provides an overview of testing approaches used in the ComfyUI Frontend codebase. These guides are meant to document any particularities or nuances of writing tests in this codebase, rather than being a comprehensive guide to testing in general. By reading these guides first, you may save yourself some time when encountering issues.
|
|
|
|
## Testing Documentation
|
|
|
|
Documentation for unit tests is organized into three guides:
|
|
|
|
- [Component Testing](./component-testing.md) - How to test Vue components
|
|
- [Unit Testing](./unit-testing.md) - How to test utility functions, composables, and other non-component code
|
|
- [Store Testing](./store-testing.md) - How to test Pinia stores specifically
|
|
|
|
## Testing Structure
|
|
|
|
The ComfyUI Frontend project uses a mixed approach to unit test organization:
|
|
|
|
- **Component Tests**: Located directly alongside their components with a `.spec.ts` extension
|
|
- **Unit Tests**: Located in the `tests-ui/tests/` directory
|
|
- **Store Tests**: Located in the `tests-ui/tests/store/` directory
|
|
- **Browser Tests**: These are located in the `browser_tests/` directory. There is a dedicated README in the `browser_tests/` directory, so it will not be covered here.
|
|
|
|
## Test Frameworks and Libraries
|
|
|
|
Our tests use the following frameworks and libraries:
|
|
|
|
- [Vitest](https://vitest.dev/) - Test runner and assertion library
|
|
- [@vue/test-utils](https://test-utils.vuejs.org/) - Vue component testing utilities
|
|
- [Pinia](https://pinia.vuejs.org/cookbook/testing.html) - For store testing
|
|
|
|
## Getting Started
|
|
|
|
To run the tests locally:
|
|
|
|
```bash
|
|
# Run unit tests
|
|
pnpm test:unit
|
|
|
|
# Run unit tests in watch mode
|
|
pnpm test:unit -- --watch
|
|
```
|
|
|
|
Refer to the specific guides for more detailed information on each testing type. |