mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
Add new test to verify that when an Authorization header is provided (#3023)
This commit is contained in:
@@ -385,6 +385,18 @@ describe('discoverMcpTools', () => {
|
||||
{},
|
||||
);
|
||||
});
|
||||
|
||||
it('should pass oauth token when provided', async () => {
|
||||
const headers = {
|
||||
Authorization: 'Bearer test-token',
|
||||
};
|
||||
const { serverConfig } = await setupHttpTest(headers);
|
||||
|
||||
expect(StreamableHTTPClientTransport).toHaveBeenCalledWith(
|
||||
new URL(serverConfig.httpUrl!),
|
||||
{ requestInit: { headers } },
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
it('should prefix tool names if multiple MCP servers are configured', async () => {
|
||||
|
||||
Reference in New Issue
Block a user