@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 13 lines 640 Bytes
Raw
1 import { describe, expect, it } from "vite-plus/test";
2
3 import { formatNextScheduledTaskRun } from "./scheduledTaskPresentation";
4
5 describe("formatNextScheduledTaskRun", () => {
6 it("names the rounded unit for a run later today", () => {
7 const now = new Date(2026, 10, 3, 10, 0, 0).getTime();
8 const at = (minutes: number) => new Date(now + minutes * 60_000).toISOString();
9 expect(formatNextScheduledTaskRun(at(59), now)).toBe("Next run in 59 minutes");
10 expect(formatNextScheduledTaskRun(at(59.5), now)).toBe("Next run in 1 hour");
11 expect(formatNextScheduledTaskRun(at(150), now)).toBe("Next run in 3 hours");
12 });
13 });