mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-24 14:45:36 +00:00
test: add mixed-format batch coverage for getPreviewParam
Verifies that when outputs contain a mix of previewable (.png) and non-previewable (.exr) images, the preview-conversion param is still suppressed, so the backend doesn't try to PIL-decode the EXR.
This commit is contained in:
@@ -317,6 +317,17 @@ describe('nodeOutputStore getPreviewParam', () => {
|
||||
expect(vi.mocked(app).getPreviewFormatParam).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('should return empty string if outputs.images mixes EXR and previewable formats', () => {
|
||||
const store = useNodeOutputStore()
|
||||
const node = createMockNode()
|
||||
const outputs = createMockOutputs([
|
||||
{ filename: 'image.png' },
|
||||
{ filename: 'render.exr' }
|
||||
])
|
||||
expect(store.getPreviewParam(node, outputs)).toBe('')
|
||||
expect(vi.mocked(app).getPreviewFormatParam).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('should return format param for standard image outputs', () => {
|
||||
const store = useNodeOutputStore()
|
||||
const node = createMockNode()
|
||||
|
||||
Reference in New Issue
Block a user