mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-24 00:34:09 +00:00
Fix node def handling of undefined fields (#1199)
* Fix node def handling * nit * Add test
This commit is contained in:
@@ -356,6 +356,20 @@ describe('ComfyNodeDefImpl', () => {
|
||||
expect(result.output.all).toEqual([])
|
||||
})
|
||||
|
||||
it('should handle undefined fields', () => {
|
||||
const plainObject = {
|
||||
name: 'EmptyOutputNode',
|
||||
display_name: 'Empty Output Node',
|
||||
category: 'Test',
|
||||
python_module: 'test_module',
|
||||
description: 'A node with no outputs'
|
||||
}
|
||||
|
||||
const result = new ComfyNodeDefImpl(plainObject)
|
||||
expect(result.output.all).toEqual([])
|
||||
expect(result.input.all).toEqual([])
|
||||
})
|
||||
|
||||
it('should handle complex input specifications', () => {
|
||||
const plainObject = {
|
||||
name: 'ComplexInputNode',
|
||||
|
||||
Reference in New Issue
Block a user