console.error pollution removed in tests
This commit is contained in:
parent
0fa2397174
commit
fee4bbec58
3 changed files with 11 additions and 0 deletions
|
|
@ -56,6 +56,8 @@ describe("SSEClientTransport", () => {
|
|||
baseUrl = new URL(`http://127.0.0.1:${addr.port}`);
|
||||
done();
|
||||
});
|
||||
|
||||
jest.spyOn(console, 'error').mockImplementation(() => {});
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
|
|
|
|||
|
|
@ -31,6 +31,10 @@ describe("requireBearerAuth middleware", () => {
|
|||
set: jest.fn().mockReturnThis(),
|
||||
};
|
||||
nextFunction = jest.fn();
|
||||
jest.spyOn(console, 'error').mockImplementation(() => {});
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -259,6 +259,11 @@ describe('MCP Auth Router', () => {
|
|||
issuerUrl: new URL('https://auth.example.com')
|
||||
};
|
||||
app.use(mcpAuthRouter(options));
|
||||
jest.spyOn(console, 'error').mockImplementation(() => {});
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
jest.restoreAllMocks();
|
||||
});
|
||||
|
||||
it('routes to authorization endpoint', async () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue