Created
February 10, 2021 13:11
-
-
Save rw3iss/801e0dee7714cab56202cad0f9156adb to your computer and use it in GitHub Desktop.
Jest + Enzyme test bootstrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'jsdom-global/register'; | |
import { configure, mount } from 'enzyme'; | |
import { h } from 'preact'; | |
import Adapter from 'enzyme-adapter-preact-pure'; | |
configure({ adapter: new Adapter }); | |
jest.mock('isomorphic-fetch'); | |
const waitForPromises = () => new Promise(setImmediate) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment