Skip to content

Commit

Permalink
chore: fix "do not mock" unit test (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhbapna authored Jan 12, 2024
1 parent 83ce2b3 commit 2949776
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/unit/proxy/proxy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,13 @@ describe("http", () => {
const response = await executeFile(
`
const axios = require("axios");
axios.get("http://redhat.com/").then(d => console.log(d.status))
axios.get("http://redhat.com/").then(d => console.log(JSON.stringify({status: d.status})));
`,
ip
);

expect(response.trim()).toBe("200");
expect(JSON.parse(response.trim())).toStrictEqual({
status: 200
});
});

test("mock with CONNECT request", async () => {
Expand Down

0 comments on commit 2949776

Please sign in to comment.