Skip to content

Commit

Permalink
Pin datetime to fix flakey dashboard test; fixes #27
Browse files Browse the repository at this point in the history
  • Loading branch information
benvinegar committed Feb 3, 2024
1 parent 104f9db commit 85306b2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/routes/dashboard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ describe("Dashboard route", () => {
}))
}));

vi.setSystemTime(new Date("2024-01-18T09:33:02").getTime());

const response = await loader({
context: {
Expand Down Expand Up @@ -133,14 +134,13 @@ describe("Dashboard route", () => {
countByDevice: [['Desktop', 3]],
viewsGroupedByInterval: [
['2024-01-11 00:00:00', 4],
['2024-01-27 00:00:00', 0],
['2024-01-28 00:00:00', 0],
['2024-01-29 00:00:00', 0],
['2024-01-30 00:00:00', 0],
['2024-01-31 00:00:00', 0],
['2024-02-01 00:00:00', 0],
['2024-02-02 00:00:00', 0],
['2024-02-03 00:00:00', 0]
['2024-01-12 00:00:00', 0],
['2024-01-13 00:00:00', 0],
['2024-01-14 00:00:00', 0],
['2024-01-15 00:00:00', 0],
['2024-01-16 00:00:00', 0],
['2024-01-17 00:00:00', 0],
['2024-01-18 00:00:00', 0],
],
intervalType: 'DAY'
});
Expand Down

0 comments on commit 85306b2

Please sign in to comment.