This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
outline/setupJest.js

14 lines
347 B
JavaScript
Raw Normal View History

/* eslint-disable */
2018-05-05 23:16:08 +00:00
import * as React from 'react';
2017-05-23 06:51:16 +00:00
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
2017-07-15 23:08:12 +00:00
import localStorage from './__mocks__/localStorage';
2017-05-23 06:51:16 +00:00
const snap = children => {
const wrapper = shallow(children);
expect(toJson(wrapper)).toMatchSnapshot();
};
2017-06-28 03:59:53 +00:00
global.localStorage = localStorage;
2017-05-23 06:51:16 +00:00
global.snap = snap;