Skip to content

Commit 3779365

Browse files
committed
style: fix test file prettier formatting
1 parent 580029f commit 3779365

File tree

1 file changed

+7
-20
lines changed

1 file changed

+7
-20
lines changed

test/integration/test/issues/issue-1211-sse-terminated.test.ts

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ import { randomUUID } from 'node:crypto';
1111
import { createServer, type Server } from 'node:http';
1212

1313
import { Client, StreamableHTTPClientTransport } from '@modelcontextprotocol/client';
14-
import {
15-
McpServer,
16-
StreamableHTTPServerTransport
17-
} from '@modelcontextprotocol/server';
14+
import { McpServer, StreamableHTTPServerTransport } from '@modelcontextprotocol/server';
1815
import { listenOnRandomPort } from '@modelcontextprotocol/test-helpers';
1916

2017
describe('SSE Stream Graceful Termination (Issue #1211)', () => {
@@ -57,13 +54,10 @@ describe('SSE Stream Graceful Termination (Issue #1211)', () => {
5754
const errors: Error[] = [];
5855

5956
clientTransport = new StreamableHTTPClientTransport(baseUrl);
60-
client = new Client(
61-
{ name: 'test-client', version: '1.0.0' },
62-
{ capabilities: {} }
63-
);
57+
client = new Client({ name: 'test-client', version: '1.0.0' }, { capabilities: {} });
6458

6559
// Track any errors
66-
clientTransport.onerror = (error) => {
60+
clientTransport.onerror = error => {
6761
errors.push(error);
6862
};
6963

@@ -79,9 +73,7 @@ describe('SSE Stream Graceful Termination (Issue #1211)', () => {
7973
await new Promise(resolve => setTimeout(resolve, 100));
8074

8175
// Should not have any "TypeError: terminated" errors reported
82-
const terminatedErrors = errors.filter(
83-
e => e.message.includes('terminated') || e.message.includes('body stream')
84-
);
76+
const terminatedErrors = errors.filter(e => e.message.includes('terminated') || e.message.includes('body stream'));
8577

8678
expect(terminatedErrors).toHaveLength(0);
8779
});
@@ -90,12 +82,9 @@ describe('SSE Stream Graceful Termination (Issue #1211)', () => {
9082
const errors: Error[] = [];
9183

9284
clientTransport = new StreamableHTTPClientTransport(baseUrl);
93-
client = new Client(
94-
{ name: 'test-client', version: '1.0.0' },
95-
{ capabilities: {} }
96-
);
85+
client = new Client({ name: 'test-client', version: '1.0.0' }, { capabilities: {} });
9786

98-
clientTransport.onerror = (error) => {
87+
clientTransport.onerror = error => {
9988
errors.push(error);
10089
};
10190

@@ -111,9 +100,7 @@ describe('SSE Stream Graceful Termination (Issue #1211)', () => {
111100
await new Promise(resolve => setTimeout(resolve, 100));
112101

113102
// No terminated errors should be reported
114-
const terminatedErrors = errors.filter(
115-
e => e.message.includes('terminated') || e.message.includes('body stream')
116-
);
103+
const terminatedErrors = errors.filter(e => e.message.includes('terminated') || e.message.includes('body stream'));
117104

118105
expect(terminatedErrors).toHaveLength(0);
119106
});

0 commit comments

Comments
 (0)