blob: 2ee87a2424bb933e3dc0a154d1fa86162ec105c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
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 },
quantity: 10,
};
const currentUser = {
me: {
cart: [cartItem, cartItem, cartItem],
},
refetch() {},
};
describe('<Cart/>', () => {
it('renders', () => {
const wrapper = shallow(<Cart currentUser={currentUser} />);
console.log(wrapper.first());
});
});
|