diff options
Diffstat (limited to 'finished-application/frontend/__tests__/Cart.test.js')
| -rw-r--r-- | finished-application/frontend/__tests__/Cart.test.js | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/finished-application/frontend/__tests__/Cart.test.js b/finished-application/frontend/__tests__/Cart.test.js index 255183e..b8afc88 100644 --- a/finished-application/frontend/__tests__/Cart.test.js +++ b/finished-application/frontend/__tests__/Cart.test.js @@ -1,13 +1,10 @@ -import React from 'react'; -import { shallow, mount } from 'enzyme'; -import toJSON from 'enzyme-to-json'; -import mountOptions from '../lib/testUtils'; +import { mount } from 'enzyme'; import wait from 'waait'; -import Cart from '../components/Cart'; +import toJSON from 'enzyme-to-json'; import { MockedProvider } from 'react-apollo/test-utils'; -import { fakeCartItem, fakeUser } from '../lib/testUtils'; +import Cart, { LOCAL_STATE_QUERY } from '../components/Cart'; import { CURRENT_USER_QUERY } from '../components/User'; -import { LOCAL_STATE_QUERY } from '../components/Cart'; +import { fakeUser, fakeCartItem } from '../lib/testUtils'; const mocks = [ { @@ -23,16 +20,12 @@ const mocks = [ }, { request: { query: LOCAL_STATE_QUERY }, - result: { - data: { - cartOpen: true, - }, - }, + result: { data: { cartOpen: true } }, }, ]; describe('<Cart/>', () => { - it('renders', async () => { + it('renders and matches snappy', async () => { const wrapper = mount( <MockedProvider mocks={mocks}> <Cart /> |
