Skip to content

Commit e0656d1

Browse files
fix: validate priming event in resumability test
1 parent d2d1672 commit e0656d1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/server/streamableHttp.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,8 +1420,10 @@ describe('StreamableHTTPServerTransport with resumability', () => {
14201420
// Read the notification from the SSE stream
14211421
const reader = sseResponse.body?.getReader();
14221422

1423-
// Skip the priming event
1424-
await reader!.read();
1423+
// Read and validate the priming event
1424+
const { value: primingValue } = await reader!.read();
1425+
const primingText = new TextDecoder().decode(primingValue);
1426+
expect(primingText).toContain('id: ');
14251427

14261428
const { value } = await reader!.read();
14271429
const text = new TextDecoder().decode(value);

0 commit comments

Comments
 (0)