10 lines
319 B
TypeScript
10 lines
319 B
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
import { getCurrentPeriodKey } from "../lib/quota-core";
|
|
|
|
test("getCurrentPeriodKey formats a UTC year-month string", () => {
|
|
const periodKey = getCurrentPeriodKey(new Date("2026-04-24T08:00:00.000Z"));
|
|
|
|
assert.equal(periodKey, "2026-04");
|
|
});
|