mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-06 16:34:36 +00:00
* feat(workspaces): align agent and schedule automation Make workspace identity the shared placement boundary for MCP and CLI, while caller identity determines parentage. Keep heartbeats minimal and cron-based without changing legacy rolling interval semantics. * test(cli): expect canonical schedule cadence * fix(automation): preserve workspace and schedule compatibility * fix(automation): preserve compatibility edges * fix(workspaces): align MCP lifecycle resolution * fix(workspaces): preserve creation intent * fix(workspaces): preserve branch and schedule identity
22 lines
650 B
TypeScript
22 lines
650 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { everyMsToFiveFieldCron } from "./cadence.js";
|
|
|
|
describe("everyMsToFiveFieldCron", () => {
|
|
it.each([
|
|
[60_000, "*/1 * * * *"],
|
|
[15 * 60_000, "*/15 * * * *"],
|
|
[60 * 60_000, "0 * * * *"],
|
|
[6 * 60 * 60_000, "0 */6 * * *"],
|
|
[24 * 60 * 60_000, "0 0 * * *"],
|
|
])("converts %i milliseconds", (everyMs, cron) => {
|
|
expect(everyMsToFiveFieldCron(everyMs)).toBe(cron);
|
|
});
|
|
|
|
it.each([30_000, 7 * 60_000, 5 * 60 * 60_000, 48 * 60 * 60_000])(
|
|
"rejects unrepresentable interval %i",
|
|
(everyMs) => {
|
|
expect(everyMsToFiveFieldCron(everyMs)).toBeNull();
|
|
},
|
|
);
|
|
});
|