This commit is contained in:
Jori Lallo
2018-01-03 21:35:13 -08:00
parent 2fd5fc2dff
commit 2c9e92e5b9
19 changed files with 130 additions and 215 deletions

13
setupJest.js Normal file
View File

@@ -0,0 +1,13 @@
/* eslint-disable */
import React from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import localStorage from './__mocks__/localStorage';
const snap = children => {
const wrapper = shallow(children);
expect(toJson(wrapper)).toMatchSnapshot();
};
global.localStorage = localStorage;
global.snap = snap;