Skip to content

Commit

Permalink
Refactor: More test around timezone resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
Wanasit Tanakitrungruang committed Jun 1, 2024
1 parent c5261b7 commit fdcfde0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/system_timezone.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ test("Test - Timezone difference on reference date", function () {
});
});

test("Test - Timezone difference on reference date #2", function () {
const refInstant = new Date("2024-02-21T10:00:00+1300");

testSingleCase(chrono, "yesterday 18:00", { instant: refInstant, timezone: 780 }, (result) => {
expect(result).toBeDate(new Date("2024-02-20T18:00:00+1300"));
});
});

test("Test - Timezone difference on written date", function () {
// Sun Jun 06 2021 19:00:00 GMT+0900 (JST)
// Sun Jun 06 2021 11:00:00 GMT+0100 (BST)
Expand Down

0 comments on commit fdcfde0

Please sign in to comment.