test(feishu): add verification to ensure readFile bypass is not injected for plain array of roots

This commit is contained in:
saurav470 2026-03-08 13:53:01 +05:30
parent e70af87a1c
commit 585f6ecf94

View File

@ -343,6 +343,9 @@ describe("sendMediaFeishu msg_type routing", () => {
localRoots: channelRoots,
}),
);
// readFile bypass must NOT be injected for a plain array of roots.
const callArg = loadWebMediaMock.mock.calls[0][1] as Record<string, unknown>;
expect(callArg).not.toHaveProperty("readFile");
});
it("honors explicit empty localRoots (no fallback to context mediaLocalRoots)", async () => {