summaryrefslogtreecommitdiffstats
path: root/frontend/__tests__/Order.test.js
blob: 6bcf0b97b7c6efd3325847124b49df273250992a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import React from 'react';
import { 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();
  });
});