Skip to content

Commit 354b98e

Browse files
committed
feat: add test coverage
1 parent 2d579c7 commit 354b98e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/index.test.ts

+8
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ describe('toHHMM', () => {
5656
expect(toHHMM(0.01)).toEqual('0:01')
5757
})
5858

59+
test('handles time ended in :59 correctly', () => {
60+
expect(toHHMM(0.999)).toEqual('0:59')
61+
})
62+
63+
test('handles time ended in :00 correctly', () => {
64+
expect(toHHMM(1)).toEqual('1:00')
65+
})
66+
5967
test('handles leading and trailing space', () => {
6068
expect(toHHMM(' -1:30 + 1:44 ')).toEqual('0:14')
6169
})

0 commit comments

Comments
 (0)