import axios from "axios";
describe("Integration Test", () => {
it("hello world integration test", async () => {
const query = { a: "hi" };
const response = await axios.get("http://localhost:3000/hello", {
params: query
});
expect(response.status).toEqual(200);
expect(response.data).toEqual(`Queries: ${JSON.stringify(query)}`);
});
});
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter