mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-20 00:03:21 +00:00
refactor(frontend): unexport isWorkflowAsCodeJob and format its tests
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user