Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed Jan 30, 2020
1 parent ba29cef commit e532f0a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('Parsing a relative date into time span timestamps', () => {
const { tsEnd: tsEnd1, tsStart: tsStart1 } = parseRelativeDates(startDate, endDate);
expect(Date.now() - new Date(tsEnd1).getTime()).toBeLessThan(20);

expect((new Date(tsStart1).getTime() - startDateStamp) as number).toBeLessThan(20);
expect(new Date(tsStart1).getTime() - (startDateStamp as number)).toBeLessThan(20);

startDate = 'now/d';
endDate = 'now/d';
Expand All @@ -32,6 +32,6 @@ describe('Parsing a relative date into time span timestamps', () => {

expect(Date.now() - new Date(tsEnd2).getTime()).toBeLessThan(20);

expect((new Date(tsStart2).getTime() - startDateStamp) as number).toBeLessThan(20);
expect(new Date(tsStart2).getTime() - (startDateStamp as number)).toBeLessThan(20);
});
});

0 comments on commit e532f0a

Please sign in to comment.