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__/Cart.test.js | 44 ---------------------- 1 file changed, 44 deletions(-) delete mode 100644 finished-application/frontend/__tests__/Cart.test.js (limited to 'finished-application/frontend/__tests__/Cart.test.js') diff --git a/finished-application/frontend/__tests__/Cart.test.js b/finished-application/frontend/__tests__/Cart.test.js deleted file mode 100644 index 0b5baf3..0000000 --- a/finished-application/frontend/__tests__/Cart.test.js +++ /dev/null @@ -1,44 +0,0 @@ -import { mount } from 'enzyme'; -import toJSON from 'enzyme-to-json'; -import wait from 'waait'; -import { MockedProvider } from 'react-apollo/test-utils'; -import Cart from '../components/Cart'; -import { fakeCartItem, fakeUser } from '../lib/testUtils'; -import { CURRENT_USER_QUERY } from '../components/User'; -import { LOCAL_STATE_QUERY } from '../components/Cart'; - -const mocks = [ - { - request: { query: CURRENT_USER_QUERY }, - result: { - data: { - me: { - ...fakeUser(), - cart: [fakeCartItem()], - }, - }, - }, - }, - { - request: { query: LOCAL_STATE_QUERY }, - result: { - data: { - cartOpen: true, - }, - }, - }, -]; - -describe('', () => { - it('renders', async () => { - const wrapper = mount( - - - - ); - await wait(); - wrapper.update(); - expect(toJSON(wrapper.find('header'))).toMatchSnapshot(); - expect(wrapper.find('CartItem')).toHaveLength(1); - }); -}); -- cgit v1.3