Skip to content

Commit eb23494

Browse files
committed
fix(server): add test:coverage script so turbo includes server tests
1 parent 66374bf commit eb23494

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

packages/server/jest.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ module.exports = {
1515
// Regular expression to find test files
1616
testRegex: '((\\.|/)index\\.test)\\.tsx?$',
1717

18+
// Stub ESM-only MCP SDK imports for Jest's CJS runtime.
19+
moduleNameMapper: {
20+
'^@modelcontextprotocol/sdk$': '<rootDir>/../components/test/__mocks__/esm-stub.js',
21+
'^@modelcontextprotocol/sdk/(.*)$': '<rootDir>/../components/test/__mocks__/esm-stub.js'
22+
},
23+
1824
// File extensions to recognize in module resolution
1925
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
2026

packages/server/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"cypress:run": "cypress run",
4848
"e2e": "start-server-and-test dev http://localhost:3000 cypress:run",
4949
"cypress:ci": "START_SERVER_AND_TEST_INSECURE=1 start-server-and-test start https-get://localhost:3000 cypress:run",
50-
"test": "jest --runInBand --detectOpenHandles --forceExit"
50+
"test": "jest --runInBand --detectOpenHandles --forceExit",
51+
"test:coverage": "jest --runInBand --detectOpenHandles --forceExit --coverage"
5152
},
5253
"keywords": [],
5354
"homepage": "https://flowiseai.com",

0 commit comments

Comments
 (0)