






















@@ -41,16 +41,11 @@ describe("config boundary guard", () => {
4141);
42424343const violations = collectDeprecatedInternalConfigApiViolations({ repoRoot });
44-expect(violations).toEqual(
45-expect.arrayContaining([
46-"extensions/telegram/src/index.ts:1 use runtime.config.current() or pass the already loaded config",
47-"extensions/telegram/src/index.ts:1 use runtime.config.current(), getRuntimeConfig(), or passed config",
48-"extensions/telegram/src/index.ts:1 use a passed cfg, context.getRuntimeConfig(), or getRuntimeConfig() at an explicit process boundary",
49-]),
50-);
51-expect(
52-violations.every((violation) => violation.startsWith("extensions/telegram/src/index.ts:")),
53-).toBe(true);
44+expect(violations).toEqual([
45+"extensions/telegram/src/index.ts:1 use runtime.config.current() or pass the already loaded config",
46+"extensions/telegram/src/index.ts:1 use runtime.config.current(), getRuntimeConfig(), or passed config",
47+"extensions/telegram/src/index.ts:1 use a passed cfg, context.getRuntimeConfig(), or getRuntimeConfig() at an explicit process boundary",
48+]);
5449});
55505651it("flags loadConfig in runtime channel action helpers only", () => {
@@ -90,13 +85,11 @@ describe("config boundary guard", () => {
9085].join("\n"),
9186);
928793-expect(collectDeprecatedInternalConfigApiViolations({ repoRoot })).toEqual(
94-expect.arrayContaining([
95-"extensions/telegram/src/index.ts:1 use narrow plugin-sdk config subpaths instead of openclaw/plugin-sdk/config-runtime",
96-"extensions/telegram/src/index.ts:2 use narrow plugin-sdk config subpaths instead of openclaw/plugin-sdk/config-runtime",
97-"extensions/telegram/src/index.ts:3 use narrow plugin-sdk config subpaths instead of openclaw/plugin-sdk/config-runtime",
98-]),
99-);
88+expect(collectDeprecatedInternalConfigApiViolations({ repoRoot })).toEqual([
89+"extensions/telegram/src/index.ts:1 use narrow plugin-sdk config subpaths instead of openclaw/plugin-sdk/config-runtime",
90+"extensions/telegram/src/index.ts:2 use narrow plugin-sdk config subpaths instead of openclaw/plugin-sdk/config-runtime",
91+"extensions/telegram/src/index.ts:3 use narrow plugin-sdk config subpaths instead of openclaw/plugin-sdk/config-runtime",
92+]);
10093});
1019410295it("flags broad config-runtime test mocks outside compat guard fixtures", () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。