Comfy-Org / Comfy-Org/ComfyUI_frontend

test: assert _subgraphSlot truthy in multi-cycle reconfigure test for consistency

Open
#10,193 0 comments 0 reactions 1 assignee Claimed by @christian-byrne View on GitHub
area:subgraph area:testing
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

## Follow-up from PR #10187

**Requested by:** @christian-byrne
**PR comment:** https://github.com/Comfy-Org/ComfyUI_frontend/pull/10187#discussion_r2947987101

### Context

In `src/lib/litegraph/src/subgraph/SubgraphNode.test.ts`, the `'Nested SubgraphNode duplicate input prevention'` describe block has two tests:

1. `'should not duplicate inputs when the referenced subgraph is reconfigured'` — asserts `node.inputs.every((i) => i._subgraphSlot)` after a single reconfigure cycle ✅
2. `'should not accumulate inputs across multiple reconfigure cycles'` — does **not** assert `_subgraphSlot` truthy after 5 reconfigure cycles ❌

### Task

Add the following assertion to the end of the second test for consistency with the first:

```ts
expect(node.inputs.every((i) => i._subgraphSlot)).toBe(true)
```

This ensures that after repeated reconfigure cycles, all inputs are still properly bound as subgraph slots.

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-10193-test-assert-_subgraphSlot-truthy-in-multi-cycle-reconfigure-test-for-consistency-3266d73d365081d1ada4cb2e74175316) by [Unito](https://www.unito.io)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.