Add editable weather captions and manage Threads scheduling with PM2
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { test } from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { nextRunAt } from '../server/threads/schedule.ts';
|
||||
|
||||
test('PM2 scheduler prepares at 03:00 Korea time regardless of host timezone', () => {
|
||||
assert.equal(nextRunAt(new Date('2026-11-01T17:00:00Z')).toISOString(), '2026-11-01T18:00:00.000Z');
|
||||
assert.equal(nextRunAt(new Date('2026-11-01T20:00:00Z')).toISOString(), '2026-11-01T20:00:00.000Z');
|
||||
assert.equal(nextRunAt(new Date('2026-11-01T20:00:00Z'), '2026-11-02').toISOString(), '2026-11-02T18:00:00.000Z');
|
||||
assert.equal(nextRunAt(new Date('2026-12-31T20:00:00Z'), '2027-01-01').toISOString(), '2027-01-01T18:00:00.000Z');
|
||||
});
|
||||
Reference in New Issue
Block a user