Accept fetch failed error message for non-open port

This commit is contained in:
Simon Warta 2023-09-07 14:11:32 +02:00
parent 9a55ecb96b
commit d288a38c18

View File

@ -38,7 +38,7 @@ describe("http", () => {
it("errors for non-open port", async () => {
await expectAsync(
http("POST", `http://localhost:56745`, undefined, createJsonRpcRequest("health")),
).toBeRejectedWithError(/(ECONNREFUSED|Failed to fetch)/i);
).toBeRejectedWithError(/(ECONNREFUSED|Failed to fetch|fetch failed)/i);
});
it("can POST to echo server with custom headers", async () => {