Skip to content

Commit

Permalink
Fix isThisHour tests to be tz-agnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
kossnocorp committed Mar 14, 2024
1 parent b1a5eb5 commit f3a1e5e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/isThisHour/test.ts
Expand Up @@ -7,7 +7,7 @@ describe("isThisHour", () => {
let clock: sinon.SinonFakeTimers;
beforeEach(() => {
clock = sinon.useFakeTimers(
new Date(2014, 8 /* Sep */, 25, 18, 30, 15, 500).getTime(),
new Date(2014, 8 /* Sep */, 25, 18, 15, 15, 500).getTime(),
);
});

Expand All @@ -31,8 +31,8 @@ describe("isThisHour", () => {
});

it("respects date extensions", () => {
expect(
isThisHour(new UTCDate(+new Date(2014, 8 /* Sep */, 25, 18, 45))),
).toBe(true);
expect(isThisHour(new UTCDate(+new Date(2014, 8 /* Sep */, 25, 18)))).toBe(
true,
);
});
});

0 comments on commit f3a1e5e

Please sign in to comment.