Watch
0
0
Fork
You've already forked hyperhive
0

swarm ui: a fire now button on each schedule

This commit is contained in:
iris 2026-11-16 11:29:23 +01:00
commit db924d9e77

View file

@ -0,0 +1,14 @@
// 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"]);
});