Skip to content

Commit ec27836

Browse files
committed
fix: tests
1 parent 66c579b commit ec27836

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export default {
33
preset: "ts-jest/presets/default-esm",
44
testEnvironment: "node",
55
extensionsToTreatAsEsm: [".ts"],
6-
testTimeout: 30000, // 30 seconds
6+
testTimeout: 3600000, // 3600 seconds
77
moduleNameMapper: {
88
"^(\\.{1,2}/.*)\\.js$": "$1", // Map .js to real paths for ESM
99
},

scripts/generate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -Eeou pipefail
44

55
curl -Lo ./scripts/spec.json https://github.com/mongodb/openapi/raw/refs/heads/main/openapi/v2/openapi-2025-03-12.json
6-
tsx --debug-port 5858 ./scripts/filter.ts > ./scripts/filteredSpec.json < ./scripts/spec.json
6+
tsx ./scripts/filter.ts > ./scripts/filteredSpec.json < ./scripts/spec.json
77
redocly bundle --ext json --remove-unused-components ./scripts/filteredSpec.json --output ./scripts/bundledSpec.json
88
openapi-typescript ./scripts/bundledSpec.json --root-types-no-schema-prefix --root-types --output ./src/common/atlas/openapi.d.ts
99
tsx ./scripts/apply.ts --spec ./scripts/bundledSpec.json --file ./src/common/atlas/apiClient.ts

tests/integration/helpers.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ export function setupIntegrationTest(): IntegrationTest {
6666
});
6767
await mcpServer.connect(serverTransport);
6868
await mcpClient.connect(clientTransport);
69+
});
70+
71+
beforeEach(async () => {
6972
randomDbName = new ObjectId().toString();
7073
});
7174

@@ -75,10 +78,10 @@ export function setupIntegrationTest(): IntegrationTest {
7578

7679
await mcpServer?.close();
7780
mcpServer = undefined;
81+
});
7882

79-
await mongoClient?.close();
80-
mongoClient = undefined;
81-
83+
afterEach(async () => {
84+
await mcpServer?.session.close();
8285
config.connectionString = undefined;
8386
});
8487

0 commit comments

Comments
 (0)