Skip to content

Commit

Permalink
test: update tests to remove cleanup manually
Browse files Browse the repository at this point in the history
Signed-off-by: Machiko Yasuda <[email protected]>
  • Loading branch information
Machiko Yasuda committed Jul 26, 2019
1 parent b467351 commit 472a5b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions package/src/components/ConfirmDialog/ConfirmDialog.test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import React from "react";
import { render, fireEvent, cleanup } from "../../tests/";
import { render, fireEvent } from "../../tests/";
import "@testing-library/jest-dom/extend-expect";
import Button from "../Button";
import ConfirmDialog from "./ConfirmDialog";

afterEach(cleanup);

test("basic snapshot - with opening the dialog", () => {
/* eslint-disable function-paren-newline */
const { asFragment, getByText, getByRole } = render(
Expand Down
4 changes: 1 addition & 3 deletions package/src/components/DialogTitle/DialogTitle.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import React from "react";
import { cleanup, render } from "../../tests/index.js";
import { render } from "../../tests/index.js";
import DialogTitle from "./DialogTitle";

afterEach(cleanup);

test("basic snapshot - only default props", () => {
const { asFragment } = render(<DialogTitle>Archive 24 products?</DialogTitle>);
expect(asFragment()).toMatchSnapshot();
Expand Down

0 comments on commit 472a5b1

Please sign in to comment.