From fdcfde0be061afc3b3e533e668c4f6e7db73e787 Mon Sep 17 00:00:00 2001 From: Wanasit Tanakitrungruang Date: Sat, 1 Jun 2024 17:00:41 +0900 Subject: [PATCH] Refactor: More test around timezone resolving --- test/system_timezone.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/system_timezone.test.ts b/test/system_timezone.test.ts index 35b771a1..ac1a9f5e 100644 --- a/test/system_timezone.test.ts +++ b/test/system_timezone.test.ts @@ -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)