13 lines
321 B
JavaScript
13 lines
321 B
JavaScript
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;
|