diff options
| author | Randy Ridge <randyridge@gmail.com> | 2018-09-14 20:01:25 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-14 20:01:25 -0400 |
| commit | 908180c77cd38011eeedcae949613da2a3391e5e (patch) | |
| tree | b59bf1aae819a04d453cde72f6e601f5561a740f /finished-application/frontend/__tests__/Cart.test.js | |
| parent | 1f6667d233a4a2e9df977204d83a8f749c050c75 (diff) | |
| parent | b3bebda57ba187b7fa10398054b54c05d3fd3555 (diff) | |
Merge branch 'master' into randyridge/our
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 /> |
