From 8a5825d52271d712ec7c8348447d433067e13ef2 Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Thu, 13 Sep 2018 14:18:56 -0400 Subject: DONE --- .../frontend/__tests__/Order.test.js | 41 ---------------------- 1 file changed, 41 deletions(-) delete mode 100644 finished-application/frontend/__tests__/Order.test.js (limited to 'finished-application/frontend/__tests__/Order.test.js') diff --git a/finished-application/frontend/__tests__/Order.test.js b/finished-application/frontend/__tests__/Order.test.js deleted file mode 100644 index f3a4f06..0000000 --- a/finished-application/frontend/__tests__/Order.test.js +++ /dev/null @@ -1,41 +0,0 @@ -import React from 'react'; -import { mount } from 'enzyme'; -import toJSON from 'enzyme-to-json'; -import wait from 'waait'; -import { MockedProvider } from 'react-apollo/test-utils'; -import Order, { SINGLE_ORDER_QUERY } from '../components/Order'; -import { fakeOrder } from '../lib/testUtils'; - -const mocks = [ - { - request: { query: SINGLE_ORDER_QUERY, variables: { id: '123' } }, - result: { - data: { - order: fakeOrder(), - }, - }, - }, -]; - -describe('', () => { - it('Renders loading state', async () => { - const wrapper = mount( - - - - ); - expect(wrapper.text()).toContain('Loading...'); - }); - - it('Renders the order', async () => { - const wrapper = mount( - - - - ); - await wait(50); - wrapper.update(); - const order = wrapper.find('div[data-test="order"]'); - expect(toJSON(order)).toMatchSnapshot(); - }); -}); -- cgit v1.3