Skip to content

Instantly share code, notes, and snippets.

@rw3iss
Created February 10, 2021 13:11
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 rw3iss/801e0dee7714cab56202cad0f9156adb to your computer and use it in GitHub Desktop.
Save rw3iss/801e0dee7714cab56202cad0f9156adb to your computer and use it in GitHub Desktop.
Jest + Enzyme test bootstrap
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