Files
lolympus-tournament-support/apps/api/src/modules/riot-background-refresh/kst-window.util.spec.ts
T
2026-05-03 13:33:57 -07:00

28 lines
675 B
TypeScript

import { isInKstBackgroundWindow } from './kst-window.util';
describe('isInKstBackgroundWindow', () => {
it('includes KST 03:00', () => {
expect(isInKstBackgroundWindow(new Date('2026-05-02T18:00:00.000Z'))).toBe(
true,
);
});
it('includes KST 09:59', () => {
expect(isInKstBackgroundWindow(new Date('2026-05-03T00:59:59.000Z'))).toBe(
true,
);
});
it('excludes KST 10:00', () => {
expect(isInKstBackgroundWindow(new Date('2026-05-03T01:00:00.000Z'))).toBe(
false,
);
});
it('excludes KST 02:59', () => {
expect(isInKstBackgroundWindow(new Date('2026-05-02T17:59:59.000Z'))).toBe(
false,
);
});
});