From f7ed74699fb5c32aee0c15d4a3c9aa1d2df190e6 Mon Sep 17 00:00:00 2001 From: Diego Imbert Date: Mon, 3 Aug 2026 17:55:03 +0200 Subject: [PATCH] refactor(frontend): unexport isWorkflowAsCodeJob and format its tests --- frontend/src/lib/utils.test.ts | 5 +++-- frontend/src/lib/utils.ts | 4 +--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/frontend/src/lib/utils.test.ts b/frontend/src/lib/utils.test.ts index f75c66edd8..725af3d26a 100644 --- a/frontend/src/lib/utils.test.ts +++ b/frontend/src/lib/utils.test.ts @@ -635,8 +635,9 @@ describe('jobDisplayDurationMs', () => { }) it('falls back to duration_ms when the timestamps are missing or inverted', () => { - expect(jobDisplayDurationMs({ ...wac, started_at: '2026-08-03T15:21:04.863Z', duration_ms: 7 })) - .toBe(7) + expect( + jobDisplayDurationMs({ ...wac, started_at: '2026-08-03T15:21:04.863Z', duration_ms: 7 }) + ).toBe(7) expect( jobDisplayDurationMs({ ...wac, diff --git a/frontend/src/lib/utils.ts b/frontend/src/lib/utils.ts index d3490fe70a..e8b7480bef 100644 --- a/frontend/src/lib/utils.ts +++ b/frontend/src/lib/utils.ts @@ -258,9 +258,7 @@ export function msToReadableTime(ms: number | undefined, maximumFractionDigits?: * `workflow_as_code_status` carries a `_checkpoint`. AI-agent jobs populate the * same column but never write `_checkpoint`, so they must not match here. */ -export function isWorkflowAsCodeJob( - job: { workflow_as_code_status?: unknown } | undefined -): boolean { +function isWorkflowAsCodeJob(job: { workflow_as_code_status?: unknown } | undefined): boolean { const wac = job?.workflow_as_code_status as Record | undefined return wac != undefined && wac['_checkpoint'] != undefined }