14 lines
488 B
JavaScript
14 lines
488 B
JavaScript
// The body of a schedule's "fire now". Run by `npm test`.
|
|
import assert from "node:assert/strict";
|
|
import { test } from "node:test";
|
|
import { fireNowBody } from "../src/pages/schedules/ScheduleTypes.ts";
|
|
|
|
test("fire now moves the start to the current second", () => {
|
|
assert.deepEqual(fireNowBody(1_700_000_123_456), {
|
|
anchor_unix: 1_700_000_123,
|
|
});
|
|
});
|
|
|
|
test("fire now sends nothing but the start", () => {
|
|
assert.deepEqual(Object.keys(fireNowBody(0)), ["anchor_unix"]);
|
|
});
|