mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-16 20:30:44 +00:00
test: clarify doctor config warning assertions
This commit is contained in:
@@ -1408,7 +1408,9 @@ describe("doctor config flow", () => {
|
||||
},
|
||||
},
|
||||
});
|
||||
expect(doctorWarnings.some((line) => line.includes("mutable allowlist"))).toBe(false);
|
||||
expect(doctorWarnings).not.toEqual(
|
||||
expect.arrayContaining([expect.stringContaining("mutable allowlist")]),
|
||||
);
|
||||
});
|
||||
|
||||
it("warns when hooks transformsDir points outside the hook transforms root", async () => {
|
||||
@@ -1533,14 +1535,16 @@ describe("doctor config flow", () => {
|
||||
},
|
||||
});
|
||||
|
||||
expect(
|
||||
doctorWarnings.some((line) =>
|
||||
line.includes(
|
||||
expect(doctorWarnings).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.stringContaining(
|
||||
'channels.telegram: channel is configured, but plugin "telegram" is disabled by plugins.entries.telegram.enabled=false.',
|
||||
),
|
||||
),
|
||||
).toBe(true);
|
||||
expect(doctorWarnings.some((line) => line.includes("first-time setup mode"))).toBe(false);
|
||||
]),
|
||||
);
|
||||
expect(doctorWarnings).not.toEqual(
|
||||
expect.arrayContaining([expect.stringContaining("first-time setup mode")]),
|
||||
);
|
||||
});
|
||||
|
||||
it("shows plugin-blocked guidance instead of first-time Telegram guidance when plugins are disabled globally", async () => {
|
||||
@@ -1556,14 +1560,16 @@ describe("doctor config flow", () => {
|
||||
},
|
||||
});
|
||||
|
||||
expect(
|
||||
doctorWarnings.some((line) =>
|
||||
line.includes(
|
||||
expect(doctorWarnings).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.stringContaining(
|
||||
"channels.telegram: channel is configured, but plugins.enabled=false blocks channel plugins globally.",
|
||||
),
|
||||
),
|
||||
).toBe(true);
|
||||
expect(doctorWarnings.some((line) => line.includes("first-time setup mode"))).toBe(false);
|
||||
]),
|
||||
);
|
||||
expect(doctorWarnings).not.toEqual(
|
||||
expect.arrayContaining([expect.stringContaining("first-time setup mode")]),
|
||||
);
|
||||
});
|
||||
|
||||
it("warns on mutable Zalouser group entries when dangerous name matching is disabled", async () => {
|
||||
@@ -1597,7 +1603,9 @@ describe("doctor config flow", () => {
|
||||
},
|
||||
});
|
||||
|
||||
expect(doctorWarnings.some((line) => line.includes("channels.zalouser.groups"))).toBe(false);
|
||||
expect(doctorWarnings).not.toEqual(
|
||||
expect.arrayContaining([expect.stringContaining("channels.zalouser.groups")]),
|
||||
);
|
||||
});
|
||||
|
||||
it("warns when imessage group allowlist is empty even if allowFrom is set", async () => {
|
||||
|
||||
Reference in New Issue
Block a user