blob: e86af7814e5a46d4c120c9597e72aa363907c0cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import React from 'react';
import { shallow, mount } from 'enzyme';
import wait from 'waait';
import toJSON from 'enzyme-to-json';
import Order from '../components/Order';
import mountOptions from './mockMang';
describe('<Order/>', () => {
it('Renders with Proper Data', async () => {
const wrapper = mount(<Order id="123" />, mountOptions);
await wait();
wrapper.update();
const order = wrapper.find('[data-test="order"]');
expect(toJSON(order)).toMatchSnapshot();
});
});
|