Button.test.js 409 B

12345678910111213
  1. import React from "react";
  2. import { mount } from "enzyme";
  3. import Button from "./../src/components/Button";
  4. describe("Button component", () => {
  5. it("Should render default button correctly", () => {
  6. expect(mount(<Button>Click me!</Button>)).toMatchSnapshot();
  7. });
  8. it("Should render custom button correctly", () => {
  9. expect(mount(<Button size="large">Hello Atlas</Button>)).toMatchSnapshot();
  10. });
  11. });