
























@@ -1414,9 +1414,7 @@ describe("doctor config flow", () => {
14141414},
14151415},
14161416});
1417-expect(doctorWarnings).not.toEqual(
1418-expect.arrayContaining([expect.stringContaining("mutable allowlist")]),
1419-);
1417+expect(doctorWarnings.some((line) => line.includes("mutable allowlist"))).toBe(false);
14201418});
1421141914221420it("warns when hooks transformsDir points outside the hook transforms root", async () => {
@@ -1541,16 +1539,14 @@ describe("doctor config flow", () => {
15411539},
15421540});
154315411544-expect(doctorWarnings).toEqual(
1545-expect.arrayContaining([
1546-expect.stringContaining(
1542+expect(
1543+doctorWarnings.some((line) =>
1544+line.includes(
15471545'channels.telegram: channel is configured, but plugin "telegram" is disabled by plugins.entries.telegram.enabled=false.',
15481546),
1549-]),
1550-);
1551-expect(doctorWarnings).not.toEqual(
1552-expect.arrayContaining([expect.stringContaining("first-time setup mode")]),
1553-);
1547+),
1548+).toBe(true);
1549+expect(doctorWarnings.some((line) => line.includes("first-time setup mode"))).toBe(false);
15541550});
1555155115561552it("shows plugin-blocked guidance instead of first-time Telegram guidance when plugins are disabled globally", async () => {
@@ -1566,16 +1562,14 @@ describe("doctor config flow", () => {
15661562},
15671563});
156815641569-expect(doctorWarnings).toEqual(
1570-expect.arrayContaining([
1571-expect.stringContaining(
1565+expect(
1566+doctorWarnings.some((line) =>
1567+line.includes(
15721568"channels.telegram: channel is configured, but plugins.enabled=false blocks channel plugins globally.",
15731569),
1574-]),
1575-);
1576-expect(doctorWarnings).not.toEqual(
1577-expect.arrayContaining([expect.stringContaining("first-time setup mode")]),
1578-);
1570+),
1571+).toBe(true);
1572+expect(doctorWarnings.some((line) => line.includes("first-time setup mode"))).toBe(false);
15791573});
1580157415811575it("warns on mutable Zalouser group entries when dangerous name matching is disabled", async () => {
@@ -1609,9 +1603,7 @@ describe("doctor config flow", () => {
16091603},
16101604});
161116051612-expect(doctorWarnings).not.toEqual(
1613-expect.arrayContaining([expect.stringContaining("channels.zalouser.groups")]),
1614-);
1606+expect(doctorWarnings.some((line) => line.includes("channels.zalouser.groups"))).toBe(false);
16151607});
1616160816171609it("warns when imessage group allowlist is empty even if allowFrom is set", async () => {
@@ -2446,28 +2438,18 @@ describe("doctor config flow", () => {
24462438};
24472439};
24482440expect(cfg.heartbeat).toBeUndefined();
2449-expect(cfg.agents?.defaults?.heartbeat).toMatchObject({
2450-model: "anthropic/claude-3-5-haiku-20241022",
2451-every: "30m",
2452-});
2441+expect(cfg.agents?.defaults?.heartbeat?.model).toBe("anthropic/claude-3-5-haiku-20241022");
2442+expect(cfg.agents?.defaults?.heartbeat?.every).toBe("30m");
24532443expect(cfg.gateway?.bind).toBe("lan");
24542444expect(cfg.session?.maintenance?.rotateBytes).toBeUndefined();
2455-expect(cfg.session?.threadBindings).toMatchObject({
2456-idleHours: 24,
2457-});
2458-expect(cfg.channels?.discord?.threadBindings).toMatchObject({
2459-idleHours: 12,
2460-});
2461-expect(cfg.channels?.discord?.accounts?.alpha?.threadBindings).toMatchObject({
2462-idleHours: 6,
2463-});
2445+expect(cfg.session?.threadBindings?.idleHours).toBe(24);
2446+expect(cfg.channels?.discord?.threadBindings?.idleHours).toBe(12);
2447+expect(cfg.channels?.discord?.accounts?.alpha?.threadBindings?.idleHours).toBe(6);
24642448expect(cfg.session?.threadBindings?.ttlHours).toBeUndefined();
24652449expect(cfg.channels?.discord?.threadBindings?.ttlHours).toBeUndefined();
24662450expect(cfg.channels?.discord?.accounts?.alpha?.threadBindings?.ttlHours).toBeUndefined();
2467-expect(cfg.channels?.defaults?.heartbeat).toMatchObject({
2468-showOk: true,
2469-showAlerts: false,
2470-});
2451+expect(cfg.channels?.defaults?.heartbeat?.showOk).toBe(true);
2452+expect(cfg.channels?.defaults?.heartbeat?.showAlerts).toBe(false);
24712453});
2472245424732455it("warns clearly about legacy config surfaces and points to doctor --fix", async () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。