Grid.test.js 460 B

12345678910111213141516171819
  1. import React from "react"
  2. import { mount } from "enzyme"
  3. import Grid from "./../src/components/Grid"
  4. describe("Grid component", () => {
  5. const Item = ({ text }) => <div>{text}</div>
  6. const component = mount(<Grid
  7. minItemWidth="250"
  8. maxItemWidth="600"
  9. items={[...Array(10).keys()].map((i, index) => <Item key={index} text={`test-${i}`} />)}
  10. />)
  11. it("Should render correctly", () => {
  12. expect(component).toMatchSnapshot()
  13. })
  14. })