@7365admin1/core 3.129.3-staging.520 → 3.129.3-staging.521
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -369,3 +369,28 @@ test("bookTimezones - one midnight job per zone the sites use", async (t) => {
|
|
|
369
369
|
assert.deepEqual(bookTimezones(null), ["Asia/Singapore"]);
|
|
370
370
|
});
|
|
371
371
|
});
|
|
372
|
+
|
|
373
|
+
test("sgtDayKey - SGT edges the guards' morning depends on", async (t) => {
|
|
374
|
+
await t.test("00:30 SGT is already the new Singapore day", () => {
|
|
375
|
+
assert.equal(sgtDayKey("2026-10-10T16:30:00.000Z"), "2026-10-11");
|
|
376
|
+
});
|
|
377
|
+
|
|
378
|
+
await t.test("07:59 SGT (23:59Z) is still the same Singapore day, not UTC's", () => {
|
|
379
|
+
assert.equal(sgtDayKey("2026-10-10T23:59:00.000Z"), "2026-10-11");
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
await t.test("month boundary: 00:30 SGT on 1 Oct is 1 Oct", () => {
|
|
383
|
+
assert.equal(sgtDayKey("2026-09-30T16:30:00.000Z"), "2026-10-01");
|
|
384
|
+
});
|
|
385
|
+
|
|
386
|
+
await t.test("year boundary: 00:30 SGT on 1 Jan is 1 Jan", () => {
|
|
387
|
+
assert.equal(sgtDayKey("2026-12-31T16:30:00.000Z"), "2027-01-01");
|
|
388
|
+
});
|
|
389
|
+
|
|
390
|
+
await t.test("a run at 07:59 SGT sees the same book window as 00:30 SGT", () => {
|
|
391
|
+
assert.deepEqual(
|
|
392
|
+
todaysOccurrenceBookWindow("2026-10-10T23:59:00.000Z"),
|
|
393
|
+
todaysOccurrenceBookWindow("2026-10-10T16:30:00.000Z"),
|
|
394
|
+
);
|
|
395
|
+
});
|
|
396
|
+
});
|