Skip to content

Commit

Permalink
fix: petlist signature
Browse files Browse the repository at this point in the history
  • Loading branch information
markkovari committed Sep 21, 2024
1 parent e2e5ea2 commit 9bf059b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions frontend/src/pages/PetList.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render, screen, waitFor } from "@testing-library/react";
import type { AxiosResponse } from "axios";
import { type Mocked, describe, expect, it, vi } from "vitest";
import * as httpClient from "../httpClient";
import { PetList } from "./PetList";
Expand Down Expand Up @@ -32,9 +31,7 @@ const mockPets = [

describe("PetList Component", () => {
it("displays pets in a table when data is available", async () => {
mockHttpClient.petList.mockResolvedValue({
data: { pets: mockPets },
} as AxiosResponse);
mockHttpClient.petList.mockResolvedValue({ pets: mockPets });

render(<PetList />);

Expand All @@ -47,9 +44,7 @@ describe("PetList Component", () => {
});

it("displays a message when no pets are registered", async () => {
mockHttpClient.petList.mockResolvedValue({
data: { pets: [] },
} as AxiosResponse);
mockHttpClient.petList.mockResolvedValue({ pets: [] });

render(<PetList />);

Expand Down

0 comments on commit 9bf059b

Please sign in to comment.