feat: allow hour durations

This commit is contained in:
Peter Steinberger
2025-12-26 01:34:46 +01:00
parent 9f7b1f0942
commit 19f87f0a89
5 changed files with 16 additions and 7 deletions

View File

@@ -15,6 +15,10 @@ describe("parseDurationMs", () => {
expect(parseDurationMs("1m")).toBe(60_000);
});
it("parses hours suffix", () => {
expect(parseDurationMs("2h")).toBe(7_200_000);
});
it("supports decimals", () => {
expect(parseDurationMs("0.5s")).toBe(500);
});