Skip to content

Commit 569c928

Browse files
committed
remove promise from test
1 parent 962a9c9 commit 569c928

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/server/streamableHttp.test.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,20 +1272,14 @@ describe("StreamableHTTPServerTransport", () => {
12721272
if ('method' in message && 'id' in message) {
12731273
const responseMessage: JSONRPCMessage = {
12741274
jsonrpc: "2.0",
1275-
result: { value: "test-result" },
1275+
result: { value: `test-result` },
12761276
id: message.id,
12771277
};
1278-
setTimeout(() => {
1279-
void jsonResponseTransport.send(responseMessage);
1280-
}, 10);
1278+
void jsonResponseTransport.send(responseMessage);
12811279
}
12821280
};
12831281

12841282
await jsonResponseTransport.handleRequest(req, mockResponse);
1285-
1286-
// Wait for all promises to resolve
1287-
await new Promise(resolve => setTimeout(resolve, 50));
1288-
12891283
// Should respond with application/json header
12901284
expect(mockResponse.writeHead).toHaveBeenCalledWith(
12911285
200,

0 commit comments

Comments
 (0)