Skip to content

Commit 69a49d9

Browse files
test(cron): expand parseAbsoluteTimeMs test coverage to 39 cases
1 parent 64a0548 commit 69a49d9

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

src/cron/parse.test.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,8 @@ describe("parseAbsoluteTimeMs", () => {
175175
expect(parseAbsoluteTimeMs("")).toBeNull();
176176
});
177177

178-
it("accepts lenient ISO date formats that JavaScript supports", () => {
179-
// JavaScript Date.parse accepts some non-standard but unambiguous formats
180-
// "2024-1-15" with single-digit month is parsed successfully
181-
const result = parseAbsoluteTimeMs("2024-1-15");
182-
expect(result).not.toBeNull();
183-
// Should normalize to standard ISO format behavior
184-
expect(result).toBeGreaterThan(0);
178+
it("rejects non-padded ISO-like date formats", () => {
179+
expect(parseAbsoluteTimeMs("2024-1-15")).toBeNull();
185180
});
186181

187182
it("rejects incomplete datetime strings", () => {

0 commit comments

Comments
 (0)