Skip to content

Commit

Permalink
Better tests and constants.
Browse files Browse the repository at this point in the history
  • Loading branch information
phix committed Apr 15, 2022
1 parent 78592e3 commit 7f64157
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions web/src/__tests__/reducers/jobs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ describe('jobs reducer', () => {
})

describe('stopWatchDuration', () => {
const oneHour = 60 * 60 * 1000;
const oneMinute = 60 * 1000;
const oneHour = 60 * oneMinute;
const oneDay = 24 * oneHour;

it('more than one week', () => {
Expand All @@ -44,8 +45,8 @@ describe('stopWatchDuration', () => {
})

it('less than one minute', () => {
const value = stopWatchDuration(oneHour - 1000);
expect("59m 59s").toBe(value);
const value = stopWatchDuration(oneMinute - 1000);
expect("0m 59s").toBe(value);
})

it('less than one second', () => {
Expand Down

0 comments on commit 7f64157

Please sign in to comment.