Skip to content
Open
Changes from all 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
12 changes: 9 additions & 3 deletions tests/requests.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down