Skip to content

Commit f82a04b

Browse files
chore: PR feedback
1 parent 0d62a1d commit f82a04b

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

src/mcp/mcpConnectionManager.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@ export class MCPConnectionManager extends ConnectionManager {
3131
connect(): Promise<AnyConnectionState> {
3232
return Promise.reject(
3333
new Error(
34-
// MCP runs in node process
3534
// eslint-disable-next-line no-multi-str
36-
"MongoDB MCP Server in MongoDB VSCode extension makes use of the connection that the MongoDB VSCode extension is connected to.\
37-
To connect, choose a connection from MongoDB VSCode extensions's sidepanel - https://www.mongodb.com/docs/mongodb-vscode/connect/#connect-to-your-mongodb-deployment",
35+
"MongoDB MCP Server in MongoDB VSCode extension makes use of the connection that the MongoDB VSCode extension is connected to. \
36+
To connect, choose a connection from MongoDB VSCode extensions's sidepanel - https://www.mongodb.com/docs/mongodb-vscode/connect/#connect-to-your-mongodb-deployment",
3837
),
3938
);
4039
}

src/test/suite/mcp/mcpConnectionErrorHandler.test.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import sinon from 'sinon';
21
import { expect } from 'chai';
3-
import { afterEach, beforeEach } from 'mocha';
2+
import { beforeEach } from 'mocha';
43
import { createMCPConnectionErrorHandler } from '../../../mcp/mcpConnectionErrorHandler';
54
import ConnectionController from '../../../connectionController';
65
import { ExtensionContextStub } from '../stubs';
@@ -24,7 +23,6 @@ class MongoDBError extends Error {
2423
}
2524
}
2625

27-
const sandbox = sinon.createSandbox();
2826
suite('mcpConnectionErrorHandler suite', () => {
2927
let connectionController: ConnectionController;
3028
beforeEach(() => {
@@ -41,11 +39,6 @@ suite('mcpConnectionErrorHandler suite', () => {
4139
});
4240
});
4341

44-
afterEach(() => {
45-
sandbox.reset();
46-
sandbox.restore();
47-
});
48-
4942
test('should handle NotConnectedToMongoDB error', () => {
5043
const handler = createMCPConnectionErrorHandler(connectionController);
5144
const result = handler(

0 commit comments

Comments
 (0)