refactor(frontend): unexport isWorkflowAsCodeJob and format its tests

This commit is contained in:
Diego Imbert
2026-08-03 17:55:03 +02:00
parent a02ff30970
commit f7ed74699f
2 changed files with 4 additions and 5 deletions
+3 -2
View File
@@ -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,
+1 -3
View File
@@ -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<string, unknown> | undefined
return wac != undefined && wac['_checkpoint'] != undefined
}