fix: throw error instead of returning it RailwayTimeConversion (#1625)

This commit is contained in:
Piotr Idzik
2024-03-02 08:54:46 +01:00
committed by GitHub
parent 8734dfccf9
commit 894a46ca67
2 changed files with 5 additions and 1 deletions

View File

@@ -19,3 +19,7 @@ test('The RailwayTimeConversion of 11:20:00PM is 23:20:00', () => {
const res = RailwayTimeConversion('11:20:00PM')
expect(res).toEqual('23:20:00')
})
test('The RailwayTimeConversion throws when input is not a string', () => {
expect(() => RailwayTimeConversion(1120)).toThrowError()
})