Skip to content

Commit 14e35c7

Browse files
committed
chore: move stdio test to integration test
1 parent ad24610 commit 14e35c7

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

packages/mcp-server-supabase/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
"build": "tsup --clean",
1212
"prepublishOnly": "npm run build",
1313
"test": "vitest",
14-
"test:e2e": "vitest --project e2e",
1514
"test:unit": "vitest --project unit",
15+
"test:e2e": "vitest --project e2e",
16+
"test:integration": "vitest --project integration",
1617
"test:coverage": "vitest --coverage",
1718
"generate:management-api-types": "openapi-typescript https://api.supabase.com/api/v1-json -o ./src/management-api/types.ts"
1819
},

packages/mcp-server-supabase/src/stdio.test.ts renamed to packages/mcp-server-supabase/test/stdio.integration.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
22
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
33
import { describe, expect, test } from 'vitest';
4-
import {
5-
ACCESS_TOKEN,
6-
MCP_CLIENT_NAME,
7-
MCP_CLIENT_VERSION,
8-
} from '../test/mocks.js';
4+
import { ACCESS_TOKEN, MCP_CLIENT_NAME, MCP_CLIENT_VERSION } from './mocks.js';
95
import { LoggingMessageNotificationSchema } from '@modelcontextprotocol/sdk/types.js';
106

117
type SetupOptions = {
@@ -36,7 +32,8 @@ async function setup(options: SetupOptions = {}) {
3632
}
3733
});
3834

39-
const args = ['-y', '@supabase/mcp-server-supabase'];
35+
const command = 'npx';
36+
const args = ['@supabase/mcp-server-supabase'];
4037

4138
if (accessToken) {
4239
args.push('--access-token', accessToken);
@@ -51,7 +48,7 @@ async function setup(options: SetupOptions = {}) {
5148
}
5249

5350
const clientTransport = new StdioClientTransport({
54-
command: 'npx',
51+
command,
5552
args,
5653
});
5754

packages/mcp-server-supabase/vitest.workspace.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,11 @@ export default defineWorkspace([
3434
testTimeout: 60_000,
3535
},
3636
},
37+
{
38+
test: {
39+
name: 'integration',
40+
include: ['test/**/*.integration.ts'],
41+
setupFiles: ['./vitest.setup.ts'],
42+
},
43+
},
3744
]);

0 commit comments

Comments
 (0)