swarm ui: a fire now button on each schedule
This commit is contained in:
parent
0db9868eee
commit
db924d9e77
1 changed files with 62 additions and 3 deletions
14
frontend/packages/swarm-ui/test/fire-now.test.mjs
Normal file
14
frontend/packages/swarm-ui/test/fire-now.test.mjs
Normal 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"]);
|
||||
});
|
||||
Loading…
Reference in a new issue