mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2026-03-13 15:21:15 +08:00
fix: throw error instead of returning it RailwayTimeConversion (#1625)
This commit is contained in:
@@ -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()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user