mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
fix: update unit test to expect pruning of non-existent node promotions
The test previously asserted that proxyWidgets entries referencing non-existent nodes (id 9999) would be kept. This was the old buggy behavior. The fix correctly prunes stale entries where the sourceNodeId no longer exists in the subgraph. Amp-Thread-ID: https://ampcode.com/threads/T-019d13a8-ed2d-726f-86f9-abbd8e859f9c Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -748,7 +748,7 @@ describe('SubgraphNode.widgets getter', () => {
|
||||
])
|
||||
})
|
||||
|
||||
test('full linked coverage does not prune unresolved independent fallback promotions', () => {
|
||||
test('full linked coverage prunes promotions referencing non-existent nodes', () => {
|
||||
const subgraph = createTestSubgraph({
|
||||
inputs: [{ name: 'widgetA', type: '*' }]
|
||||
})
|
||||
@@ -773,9 +773,9 @@ describe('SubgraphNode.widgets getter', () => {
|
||||
subgraphNode.rootGraph.id,
|
||||
subgraphNode.id
|
||||
)
|
||||
// Node 9999 does not exist in the subgraph, so its entry is pruned
|
||||
expect(promotions).toStrictEqual([
|
||||
{ sourceNodeId: String(liveNode.id), sourceWidgetName: 'widgetA' },
|
||||
{ sourceNodeId: '9999', sourceWidgetName: 'widgetA' }
|
||||
{ sourceNodeId: String(liveNode.id), sourceWidgetName: 'widgetA' }
|
||||
])
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user