This commit is contained in:
Tom Moor
2017-07-15 16:08:12 -07:00
parent 0caff8c393
commit 66e4995885
8 changed files with 15 additions and 12 deletions

12
setupJest.js Normal file
View File

@ -0,0 +1,12 @@
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;