Skip to content

Instantly share code, notes, and snippets.

@Lelith
Created April 21, 2020 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lelith/98c44dad56b02669c64b71b0ed7d8e00 to your computer and use it in GitHub Desktop.
Save Lelith/98c44dad56b02669c64b71b0ed7d8e00 to your computer and use it in GitHub Desktop.
Jest Setup File
/* src/setupTests.js */
// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom/extend-expect';
import { configure } from "enzyme"
import Adapter from "enzyme-adapter-react-16"
configure({ adapter: new Adapter() })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment