Skip to content

Commit 4ceb97d

Browse files
committed
test: temp
1 parent 105931f commit 4ceb97d

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

tests/httpTransport.test.ts

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,35 @@
11
/**
2-
* E2E tests for HTTP transport using StreamableHTTPServerTransport
3-
* Tests core functionality including server startup, MCP protocol, tool execution, and performance
2+
* Requires: npm run build prior to running Jest.
43
*/
54

65
import { startHttpServer, type HttpTransportClient } from './utils/httpTransportClient';
76

7+
describe('PatternFly MCP, HTTP Transport', () => {
8+
let client: HttpTransportClient;
9+
10+
beforeEach(async () => {
11+
client = await startHttpServer({ port: 5001, args: ['--killExisting'] });
12+
});
13+
14+
afterEach(async () => client.close());
15+
16+
it('should expose expected tools', async () => {
17+
const req = {
18+
jsonrpc: '2.0',
19+
id: 1,
20+
method: 'tools/list',
21+
params: {}
22+
};
23+
24+
const response = await client.send(req as any);
25+
const tools = response.result?.tools || [];
26+
const toolNames = tools.map(tool => tool.name).sort() || [];
27+
28+
expect(toolNames).toMatchSnapshot('tools');
29+
});
30+
});
31+
32+
/*
833
describe('PatternFly MCP, HTTP Transport', () => {
934
let client: HttpTransportClient;
1035
@@ -168,3 +193,4 @@ describe('PatternFly MCP, HTTP Transport', () => {
168193
});
169194
});
170195
});
196+
*/

0 commit comments

Comments
 (0)