Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

test(mcp): name the chat-restricted refusal for what it checks

Yudhi Armyndharis98f32ee29054
diff --git a/src/core/agent-tools/tool-invoker.spec.ts b/src/core/agent-tools/tool-invoker.spec.ts
index 3449331f5..fd1a4460f 100644
--- a/src/core/agent-tools/tool-invoker.spec.ts
+++ b/src/core/agent-tools/tool-invoker.spec.ts
@@ -34,7 +34,7 @@ describe('invokeTool', () => {
expect(out).toEqual({ got: 5 });
});
- it('refuses a chat-restricted key (chat-scoped tool arguments are a later slice)', async () => {
+ it('refuses a chat-restricted key on a tool that declares no chat scope', async () => {
const a = auth({ allowedChats: ['[email protected]'] });
await expect(invokeTool(readTool, { n: 1 }, 'rawkey', a as unknown as AuthService)).rejects.toBeInstanceOf(
ForbiddenException,