Skip to content

Commit d923aa6

Browse files
fix: remove unused primingEventId variables
1 parent ec409a2 commit d923aa6

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/server/streamableHttp.test.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -538,9 +538,7 @@ describe('StreamableHTTPServerTransport', () => {
538538
const { value: primingValue } = await reader!.read();
539539
const primingText = new TextDecoder().decode(primingValue);
540540
expect(primingText).toContain('id: ');
541-
const primingIdMatch = primingText.match(/id: ([^\n]+)/);
542-
expect(primingIdMatch).toBeTruthy();
543-
const primingEventId = primingIdMatch![1];
541+
expect(primingText.match(/id: ([^\n]+)/)).toBeTruthy();
544542

545543
// Send a notification
546544
const notification1: JSONRPCMessage = {
@@ -1642,10 +1640,8 @@ describe('StreamableHTTPServerTransport SSE priming events', () => {
16421640
expect(primingText).toContain('data: ');
16431641
expect(primingText).not.toContain('retry:');
16441642

1645-
// Extract priming event ID
1646-
const primingIdMatch = primingText.match(/id: ([^\n]+)/);
1647-
expect(primingIdMatch).toBeTruthy();
1648-
const primingEventId = primingIdMatch![1];
1643+
// Verify priming event has ID
1644+
expect(primingText.match(/id: ([^\n]+)/)).toBeTruthy();
16491645

16501646
// Send a notification
16511647
const notification: JSONRPCMessage = {

0 commit comments

Comments
 (0)