Skip to content

Commit

Permalink
test修正
Browse files Browse the repository at this point in the history
  • Loading branch information
tubone24 committed Apr 3, 2022
1 parent b1931a0 commit 6800482
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/unit/components/carousel.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import Carousel from "../../../src/components/carousel";

test("Displays the correct images", () => {
const { getByAltText } = render(
<Carousel images={["test1.png", "test2.png"]} />
<Carousel images={[{ src: "test1.png", title: "test1" }, { src: "test2.png", title: "test2" },]} />
);
screen.debug();
expect(getByAltText("test1.png").getAttribute("src")).toEqual("test1.png");
expect(getByAltText("test2.png").getAttribute("src")).toEqual("test2.png");
expect(getByAltText("test1").getAttribute("src")).toEqual("test1.png");
expect(getByAltText("test2").getAttribute("src")).toEqual("test2.png");
});

0 comments on commit 6800482

Please sign in to comment.