Durations over an hour lose their hours
example/timekit · pull request from an AI agent
Verdict Proven fixed
| Input | parseDuration("1h30m") |
|---|---|
| Before the fix | 30 minutes |
| After the fix | 90 minutes |
| Expected | “parseDuration("1h30m") should return 90 but it returns 30. The hours get dropped.”Quoted from the bug report |
Checked
- Hours and minutes together
- Hours alone and minutes alone still work
- Same result on 5 of 5 runs
Not checked
- Inputs with seconds like 1h30m15s
- Empty or negative input
- Other code that calls parseDuration
test("1h30m is 90 minutes", () => {
expect(parseDuration("1h30m")).toBe(90);
});
# run it on the old code, then on the new code
npx vitest run duration.test.ts
Empiricant check result
Proven broken The bug from issue #481 is still there.
slugify("Café au lait")"caf-au-lait""caf-au-lait"unchanged"cafe-au-lait"From issue #481