diff --git a/tests/requests.test.js b/tests/requests.test.js index 974c34a..597ac05 100644 --- a/tests/requests.test.js +++ b/tests/requests.test.js @@ -29,9 +29,15 @@ describe("requests.js", () => { ]; it("should make a GET request to the appropriate URL", async () => { - // Write code here - expect(1).toBe(2); - }); + jest.spyOn(axios, "get"); + + await index(); + + const expectedURL = `${BASE_URL}/constellations`; + expect(axios.get).toHaveBeenCalledWith(expectedURL); + + jest.clearAllMocks(); +}); it("should return a list of constellations with fewer than 10 stars with planets", async () => { // Write code here