Updated jest for frontend
This commit is contained in:
11
frontend/utils/setupJest.js
Normal file
11
frontend/utils/setupJest.js
Normal file
@ -0,0 +1,11 @@
|
||||
/* eslint-disable */
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import toJson from 'enzyme-to-json';
|
||||
|
||||
const snap = children => {
|
||||
const wrapper = shallow(children);
|
||||
expect(toJson(wrapper)).toMatchSnapshot();
|
||||
};
|
||||
|
||||
global.snap = snap;
|
Reference in New Issue
Block a user