Skip to content

Commit

Permalink
test: fix response from http2 client
Browse files Browse the repository at this point in the history
  • Loading branch information
Mastercuber committed Dec 14, 2023
1 parent 35fe367 commit b8b1608
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,11 @@ describe("listhen", () => {
listener = await listen(handle);
expect(listener.url.startsWith("http://")).toBeTruthy();

// Protocol HTTP 0.9 is used in firefox
await expect(sendHttp2Request(listener.url)).rejects.toThrowError(
"Protocol error",
);
const response = (await sendRequest(listener.url, false)) as string;
expect(JSON.parse(response)).toEqual({
path: "/",
httpVersion: "1.1",
});
});

describe("https", () => {
Expand Down

0 comments on commit b8b1608

Please sign in to comment.