Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions test/repl/raw-http-client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ describe("RawHttpClient", () => {

client.get("/pets");

await capture;
const raw = await capture;
expect(raw).toMatch(/^GET \/pets HTTP\/1\.1/);
// Allow the event loop to flush the client's "data"/"end" socket events so
// that #printResponse (including highlightJson with boolean/null values) runs.
await new Promise((resolve) => setTimeout(resolve, 20));
Expand All @@ -227,7 +228,8 @@ describe("RawHttpClient", () => {

client.get("/pets");

await capture;
const raw = await capture;
expect(raw).toMatch(/^GET \/pets HTTP\/1\.1/);
await new Promise((resolve) => setTimeout(resolve, 20));
});

Expand All @@ -240,7 +242,8 @@ describe("RawHttpClient", () => {

client.get("/status");

await capture;
const raw = await capture;
expect(raw).toMatch(/^GET \/status HTTP\/1\.1/);
await new Promise((resolve) => setTimeout(resolve, 20));
});
});
Loading