


















@@ -344,9 +344,7 @@ describe("applyJobPatch", () => {
344344to: "https://example.invalid/original",
345345});
346346347-expect(() =>
348-applyJobPatch(job, { delivery: { mode: "webhook", to: " https://example.invalid/trim " } }),
349-).not.toThrow();
347+applyJobPatch(job, { delivery: { mode: "webhook", to: " https://example.invalid/trim " } });
350348expect(job.delivery).toEqual({ mode: "webhook", to: "https://example.invalid/trim" });
351349});
352350@@ -470,7 +468,7 @@ describe("createJob rejects sessionTarget main for non-default agents", () => {
470468471469it("allows isolated session job for non-default agents", () => {
472470const state = createMockState(now, { defaultAgentId: "main" });
473-expect(() =>
471+expect(
474472createJob(state, {
475473name: "isolated-job",
476474enabled: true,
@@ -480,7 +478,10 @@ describe("createJob rejects sessionTarget main for non-default agents", () => {
480478payload: { kind: "agentTurn", message: "do it" },
481479agentId: "custom-agent",
482480}),
483-).not.toThrow();
481+).toMatchObject({
482+agentId: "custom-agent",
483+sessionTarget: "isolated",
484+});
484485});
485486486487it("rejects custom session targets with path separators", () => {
@@ -924,7 +925,7 @@ describe("recomputeNextRuns", () => {
924925expect(job.state.nextRunAtMs).toBe(expected);
925926});
926927927-it("does not throw while probing malformed cron schedules with future nextRunAtMs", () => {
928+it("keeps future nextRunAtMs while probing malformed cron schedules", () => {
928929const now = Date.parse("2026-05-05T12:00:00.000Z");
929930const future = Date.parse("2026-05-12T16:00:00.000Z");
930931const job: CronJob = {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。