diff options
Diffstat (limited to 'frontend/__tests__/Order.test.js')
| -rw-r--r-- | frontend/__tests__/Order.test.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/frontend/__tests__/Order.test.js b/frontend/__tests__/Order.test.js new file mode 100644 index 0000000..6bcf0b9 --- /dev/null +++ b/frontend/__tests__/Order.test.js @@ -0,0 +1,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(); + }); +}); |
