Comfy-Org / Comfy-Org/ComfyUI_frontend
test(widgetStore): add COMBO array-spec edge case to inputIsWidget unit tests
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
## Summary
In `src/stores/widgetStore.test.ts`, the current `inputIsWidget` tests do not cover the V1 COMBO array-spec shape. V1 COMBO specs take the form `[['option1', 'option2'], {}]`, so when the `getInputSpecType` mock returns `spec[0]`, the result is an **array** rather than a string. This edge case is not currently exercised and could mask a real bug in `inputIsWidget` when handling COMBO-type specs.
## Task
Add a unit test (or extend existing tests) in `src/stores/widgetStore.test.ts` that passes a V1 COMBO array-spec and asserts that `inputIsWidget` correctly identifies (or rejects) it as a widget type.
## References
- PR: https://github.com/Comfy-Org/ComfyUI_frontend/pull/10647
- Review comment: https://github.com/Comfy-Org/ComfyUI_frontend/pull/10647#discussion_r3011921063
- Requested by: @DrJKL
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-10933-test-widgetStore-add-COMBO-array-spec-edge-case-to-inputIsWidget-unit-tests-33b6d73d365081c6a4b9e3ff8afbaf4f) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.