Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
jsdom + enzyme + ava
npm install --save-dev jsdom
// test-browser-env.js
import { jsdom } from 'jsdom';
global.document = jsdom('<body></body>');
global.window = document.defaultView;
global.navigator = window.navigator;
// package.json
"ava": {
"require": [
Copy link

flubox commented Apr 7, 2017

thanks :)

Copy link

pablopaul commented Aug 30, 2017

thanks @peduarte,

everybody else can find a updated and working example here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment