diff options
| author | Wes Bos <wesbos@gmail.com> | 2018-03-14 21:00:08 -0400 |
|---|---|---|
| committer | Wes Bos <wesbos@gmail.com> | 2018-03-14 21:00:08 -0400 |
| commit | bd45d4c7aac6d1c6b054185058a96b2e01669828 (patch) | |
| tree | aeee19f26cc846496213822b6b28c9aa223bc6d1 /frontend/__tests__/Cart.test.js | |
| parent | 7c760dd4d1e27180222d3d524949216e5b65194a (diff) | |
tests
Diffstat (limited to 'frontend/__tests__/Cart.test.js')
| -rw-r--r-- | frontend/__tests__/Cart.test.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/frontend/__tests__/Cart.test.js b/frontend/__tests__/Cart.test.js new file mode 100644 index 0000000..0936e97 --- /dev/null +++ b/frontend/__tests__/Cart.test.js @@ -0,0 +1,30 @@ +import React from 'react'; +import { shallow, mount } from 'enzyme'; +import toJSON from 'enzyme-to-json'; +import { Cart } from '../components/Cart'; + +const cartItem = { + item: { price: 5000 }, + quantity: 10, +}; + +const currentUser = { + me: { + cart: [cartItem, cartItem, cartItem], + }, + refetch() {}, +}; + +describe('<Cart/>', () => { + it('renders', () => { + const wrapper = shallow(<Cart currentUser={currentUser} />); + }); + + xit('opens', () => { + const wrapper = shallow(<Cart currentUser={currentUser} />); + expect('wes').toEqual('figure out how to call test context'); + }); + // it('renders', () => { + // shallow(<Cart currentUser={currentUserLoggedOut} />); + // }); +}); |
