Comfy-Org / Comfy-Org/ComfyUI_frontend
refactor: colocate WidgetImageCrop component tests with source file
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 495
Description
## Summary
The `WidgetImageCrop` component tests currently live inside `src/composables/useImageCrop.test.ts` rather than being colocated with the component source at `src/components/imagecrop/WidgetImageCrop.test.ts`.
Project convention is to colocate tests with their source file. The `describe('WidgetImageCrop', ...)` block (and any related helpers) should be extracted into a dedicated `src/components/imagecrop/WidgetImageCrop.test.ts` file.
## Task
- Move the `describe('WidgetImageCrop', ...)` suite out of `src/composables/useImageCrop.test.ts`
- Create `src/components/imagecrop/WidgetImageCrop.test.ts` and place the tests there
- Ensure shared test helpers/mocks are either duplicated or extracted to a shared test-utility module as appropriate
- Verify all tests pass after the move
## References
- Identified in PR: https://github.com/Comfy-Org/ComfyUI_frontend/pull/11193
- Review comment: https://github.com/Comfy-Org/ComfyUI_frontend/pull/11193#discussion_r3090277435
- Requested by: @christian-byrne
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11348-refactor-colocate-WidgetImageCrop-component-tests-with-source-file-3456d73d365081538596da7e5e1ef3da) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.