remove promise from test
This commit is contained in:
parent
962a9c959a
commit
569c928794
1 changed files with 2 additions and 8 deletions
|
|
@ -1272,20 +1272,14 @@ describe("StreamableHTTPServerTransport", () => {
|
|||
if ('method' in message && 'id' in message) {
|
||||
const responseMessage: JSONRPCMessage = {
|
||||
jsonrpc: "2.0",
|
||||
result: { value: "test-result" },
|
||||
result: { value: `test-result` },
|
||||
id: message.id,
|
||||
};
|
||||
setTimeout(() => {
|
||||
void jsonResponseTransport.send(responseMessage);
|
||||
}, 10);
|
||||
void jsonResponseTransport.send(responseMessage);
|
||||
}
|
||||
};
|
||||
|
||||
await jsonResponseTransport.handleRequest(req, mockResponse);
|
||||
|
||||
// Wait for all promises to resolve
|
||||
await new Promise(resolve => setTimeout(resolve, 50));
|
||||
|
||||
// Should respond with application/json header
|
||||
expect(mockResponse.writeHead).toHaveBeenCalledWith(
|
||||
200,
|
||||
|
|
|
|||
Loading…
Reference in a new issue