Skip to content

Commit

Permalink
refactor(*): cleanup unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
topheman committed Apr 28, 2018
1 parent 3829d5e commit 51777eb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
11 changes: 11 additions & 0 deletions src/setupTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@
import { configure } from "enzyme";
import Adapter from "enzyme-adapter-react-16";

/**
* Gives access to the following jest custom matchers:
* - toBeInTheDOM
* - toHaveTextContent
* - toHaveAttribute
* - toHaveClass
*
* Can also be exposed from "dom-testing-library" via `import "dom-testing-library/extend-expect"`
*/
import "jest-dom/extend-expect";

configure({ adapter: new Adapter() });

global.window.resizeTo = (width, height) => {
Expand Down
10 changes: 0 additions & 10 deletions src/testUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,6 @@
import React from "react";
import { MemoryRouter } from "react-router-dom";
import { render } from "react-testing-library";
// add the custom expect matchers
import "dom-testing-library/extend-expect";
/**
* Gives access to following jest custom matcher:
* - toBeInTheDOM
* - toHaveTextContent
* - toHaveAttribute
* - toHaveClass
*/
import "jest-dom/extend-expect";

const renderWithRouter = (ui, renderOptions = {}) =>
render(<MemoryRouter>{ui}</MemoryRouter>, renderOptions);
Expand Down

0 comments on commit 51777eb

Please sign in to comment.