Skip to content

Commit

Permalink
Rename to jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaolin committed Jul 30, 2023
1 parent 66a56b4 commit e791e2d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/components/ImageGallery.test.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from "react";
import { render, screen } from "@testing-library/react";

import ImageGallery from "./ImageGallery";

describe("<ImageGallery />", () => {
const defaultProps = {
items: [
{
original: "test.png",
thumbnail: "test_thumb.png",
},
],
};

it("renders slides", () => {
render(<ImageGallery {...defaultProps} />);
const elements = screen.getAllByLabelText("Go to Slide 1");
// expect a thumbnail and slide label
expect(elements.length).toBe(2);
});
});

0 comments on commit e791e2d

Please sign in to comment.