Skip to content

Commit 920f78a

Browse files
authored
Merge pull request #9 from SocketDev/bret/assert-key
Assert we have an API key in tests
2 parents 1055aea + 8efc5d6 commit 920f78a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js'
66
import { join } from 'path'
77

88
test('Socket MCP Server', async (t) => {
9+
const apiKey = process.env['SOCKET_API_KEY']
10+
assert.ok(apiKey, 'We have an API key. Tests will not pass without it')
911
const serverPath = join(import.meta.dirname, 'index.ts')
1012

1113
const transport = new StdioClientTransport({
1214
command: 'node',
1315
args: ['--experimental-strip-types', serverPath],
1416
env: {
1517
...process.env,
16-
SOCKET_API_KEY: process.env['SOCKET_API_KEY'] || ''
18+
SOCKET_API_KEY: apiKey
1719
}
1820
})
1921

0 commit comments

Comments
 (0)