Skip to content

Commit

Permalink
Add additional unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jmccollum-woolpert committed Nov 6, 2023
1 parent 866008e commit 7be96f6
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,15 @@ describe('BaseRoutesMetadataTableComponent', () => {
it('should create', () => {
expect(component).toBeTruthy();
});

it('should format traveled time', () => {
expect(component.formattedTravelTime(0)).toBe('00:00');
expect(component.formattedTravelTime(61)).toBe('00:01');
expect(component.formattedTravelTime(1910)).toBe('00:31');
expect(component.formattedTravelTime(3600)).toBe('01:00');
expect(component.formattedTravelTime(7260)).toBe('02:01');
expect(component.formattedTravelTime(7300)).toBe('02:01');
expect(component.formattedTravelTime(86400)).toBe('24:00');
expect(component.formattedTravelTime(90120)).toBe('25:02');
});
});

0 comments on commit 7be96f6

Please sign in to comment.