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": [

This comment has been minimized.

Copy link

@flubox flubox commented Apr 7, 2017

thanks :)


This comment has been minimized.

Copy link

@pablopaul 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
You can’t perform that action at this time.