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:
glary-bot
2026-05-15 04:27:30 +00:00
parent 492027db84
commit 67db42e715

View File

@@ -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()