Comfy-Org / Comfy-Org/ComfyUI_frontend
desktop-ui: zero test coverage (56 source files, 0 tests)
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
## Problem
`apps/desktop-ui` has **56 source files** (components, composables, stores, utils, views) and **zero test files**. No `.test.ts` or `.spec.ts` files exist anywhere in the package. The only quality signal comes from 4 Storybook story files.
### Key untested areas
| File | Lines | Purpose |
|------|-------|---------|
| `stores/maintenanceTaskStore.ts` | ~80 | Pinia store managing electron maintenance tasks |
| `composables/bottomPanelTabs/useTerminal.ts` | ~60 | Terminal rendering composable |
| `composables/bottomPanelTabs/useTerminalBuffer.ts` | ~50 | Terminal buffer management |
| `utils/validationUtil.ts` | ~50 | Installation path validation with multiple rules |
| `utils/electronMirrorCheck.ts` | ~30 | Mirror URL reachability |
| `utils/refUtil.ts` | ~40 | `useMinLoadingDurationRef` reactive utility |
| `utils/envUtil.ts` | ~20 | Electron API detection |
| `constants/desktopMaintenanceTasks.ts` | ~80 | Task definitions |
| `constants/desktopDialogs.ts` | ~30 | Dialog definitions |
### Current state
- `package.json` has no `test` script
- No vitest configuration for the workspace
- The store, composables, and utils all contain testable business logic
### Suggested fix
1. Add vitest configuration for the desktop-ui workspace
2. Add a `test:unit` script to `apps/desktop-ui/package.json`
3. Prioritize testing: `maintenanceTaskStore`, `validationUtil`, `refUtil`, `electronMirrorCheck`
4. These are all pure logic units that can be tested without Electron
Parent: #11022
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11102-desktop-ui-zero-test-coverage-56-source-files-0-tests-33e6d73d3650815cbfaedac2541eb2dd) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.