summaryrefslogtreecommitdiffstats
path: root/frontend/__tests__/Cart.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/__tests__/Cart.test.js')
-rw-r--r--frontend/__tests__/Cart.test.js30
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} />);
+ // });
+});