Context
formatEta(seconds) in apps/desktop-tauri/src/surfaces/settings/providers/sections/PaceSection.tsx:44 renders a seconds value as a compact m/h/d string (<60m → minutes, <24h → hours, else days). It is pure and has no test file.
Task
Add unit tests for formatEta. The function is currently module-private — export it (export function formatEta) so it can be imported directly by a new PaceSection.test.tsx (or a small PaceSection.formatEta.test.ts).
Acceptance criteria
- Covers the boundaries:
0, 59s, exactly 60s (→ 1m), 59m, 60m (→ 1h), 23h59m, 24h (→ 1d), and a multi-day value.
- Covers negative input (function clamps minutes at
0).
- Uses the existing vitest setup; no app launch.
How to test
pnpm --dir apps/desktop-tauri test
Pointers
- Function:
PaceSection.tsx:44
- Sibling tests to copy the pattern from live under
apps/desktop-tauri/src/lib/*.test.ts.
Context
formatEta(seconds)inapps/desktop-tauri/src/surfaces/settings/providers/sections/PaceSection.tsx:44renders a seconds value as a compactm/h/dstring (<60m→ minutes,<24h→ hours, else days). It is pure and has no test file.Task
Add unit tests for
formatEta. The function is currently module-private — export it (export function formatEta) so it can be imported directly by a newPaceSection.test.tsx(or a smallPaceSection.formatEta.test.ts).Acceptance criteria
0,59s, exactly60s(→1m),59m,60m(→1h),23h59m,24h(→1d), and a multi-day value.0).How to test
Pointers
PaceSection.tsx:44apps/desktop-tauri/src/lib/*.test.ts.