From 67db42e71595fce24446857b2a5fc1a355fd261b Mon Sep 17 00:00:00 2001 From: glary-bot Date: Fri, 15 May 2026 04:27:30 +0000 Subject: [PATCH] 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. --- src/stores/nodeOutputStore.test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/stores/nodeOutputStore.test.ts b/src/stores/nodeOutputStore.test.ts index 03604a7ed3..f529120767 100644 --- a/src/stores/nodeOutputStore.test.ts +++ b/src/stores/nodeOutputStore.test.ts @@ -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()