test(plugin-sdk): use narrow config runtime mocks

This commit is contained in:
Peter Steinberger
2026-04-27 15:13:53 +01:00
parent a2af8054e1
commit 9090457da7
45 changed files with 229 additions and 130 deletions

View File

@@ -99,6 +99,19 @@ describe("config boundary guard", () => {
);
});
it("flags broad config-runtime test mocks outside compat guard fixtures", () => {
const repoRoot = makeRepoFixture();
writeFixture(
repoRoot,
"extensions/telegram/src/index.test.ts",
'vi.mock("openclaw/plugin-sdk/config-runtime", () => ({}));',
);
expect(collectDeprecatedInternalConfigApiViolations({ repoRoot })).toEqual([
"extensions/telegram/src/index.test.ts:1 use narrow plugin-sdk config subpaths instead of openclaw/plugin-sdk/config-runtime",
]);
});
it("allows narrow config SDK subpaths in production code", () => {
const repoRoot = makeRepoFixture();
writeFixture(