From 92f612a995c54f7423bd2b760fb1a324044693a6 Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Tue, 20 Mar 2018 14:48:34 -0400 Subject: Starting testing --- frontend/__tests__/Cart.test.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'frontend/__tests__/Cart.test.js') diff --git a/frontend/__tests__/Cart.test.js b/frontend/__tests__/Cart.test.js index 0936e97..1e7d7f5 100644 --- a/frontend/__tests__/Cart.test.js +++ b/frontend/__tests__/Cart.test.js @@ -2,6 +2,7 @@ import React from 'react'; import { shallow, mount } from 'enzyme'; import toJSON from 'enzyme-to-json'; import { Cart } from '../components/Cart'; +import { UIProvider } from '../components/UIContext'; const cartItem = { item: { price: 5000 }, @@ -17,14 +18,12 @@ const currentUser = { describe('', () => { it('renders', () => { - const wrapper = shallow(); - }); + const wrapper = mount( + + + + ); - xit('opens', () => { - const wrapper = shallow(); - expect('wes').toEqual('figure out how to call test context'); + expect(toJSON(wrapper)).toMatchSnapshot(); }); - // it('renders', () => { - // shallow(); - // }); }); -- cgit v1.3