mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 10:50:38 +09:00
35 lines
846 B
TypeScript
35 lines
846 B
TypeScript
|
|
// @vitest-environment node
|
||
|
|
import { describe, expect, it } from "vitest";
|
||
|
|
import { buildNewAgentRuntimeConfig } from "./new-agent-runtime-config";
|
||
|
|
|
||
|
|
describe("buildNewAgentRuntimeConfig", () => {
|
||
|
|
it("defaults new agents to no timer heartbeat", () => {
|
||
|
|
expect(buildNewAgentRuntimeConfig()).toEqual({
|
||
|
|
heartbeat: {
|
||
|
|
enabled: false,
|
||
|
|
intervalSec: 300,
|
||
|
|
wakeOnDemand: true,
|
||
|
|
cooldownSec: 10,
|
||
|
|
maxConcurrentRuns: 1,
|
||
|
|
},
|
||
|
|
});
|
||
|
|
});
|
||
|
|
|
||
|
|
it("preserves explicit heartbeat settings", () => {
|
||
|
|
expect(
|
||
|
|
buildNewAgentRuntimeConfig({
|
||
|
|
heartbeatEnabled: true,
|
||
|
|
intervalSec: 3600,
|
||
|
|
}),
|
||
|
|
).toEqual({
|
||
|
|
heartbeat: {
|
||
|
|
enabled: true,
|
||
|
|
intervalSec: 3600,
|
||
|
|
wakeOnDemand: true,
|
||
|
|
cooldownSec: 10,
|
||
|
|
maxConcurrentRuns: 1,
|
||
|
|
},
|
||
|
|
});
|
||
|
|
});
|
||
|
|
});
|