diff --git a/react-context-api/src/App.test.js b/react-context-api/src/App.test.js index 5c70fc828..161b89ab5 100644 --- a/react-context-api/src/App.test.js +++ b/react-context-api/src/App.test.js @@ -16,7 +16,10 @@ describe("Render App Component Without Error", () => { let wrapper; beforeEach(() => { const initialState = { - currentUser: {} + user: {}, + cart: [], + directory: [], + shop: [] }; wrapper = setUp(initialState); }); @@ -24,4 +27,8 @@ describe("Render App Component Without Error", () => { const component = findByDataAttr(wrapper, "app"); expect(component.length).toBe(1); }); + it("Should render App", () => { + const component = wrapper; + expect(component).toMatchSnapshot(); + }); }); diff --git a/react-context-api/src/__snapshots__/App.test.js.snap b/react-context-api/src/__snapshots__/App.test.js.snap new file mode 100644 index 000000000..ac9a59e37 --- /dev/null +++ b/react-context-api/src/__snapshots__/App.test.js.snap @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Render App Component Without Error Should render App 1`] = `ShallowWrapper {}`; diff --git a/react-context-api/src/containers/CheckoutContainer/CheckoutContainer.js b/react-context-api/src/containers/CheckoutContainer/CheckoutContainer.js index e279a09d1..d19bfba81 100644 --- a/react-context-api/src/containers/CheckoutContainer/CheckoutContainer.js +++ b/react-context-api/src/containers/CheckoutContainer/CheckoutContainer.js @@ -12,8 +12,8 @@ import { import "./checkout.styles.scss"; import CheckoutItemContainer from "../CheckoutItemContainer/CheckoutItemContainer"; -const CheckoutPage = ({ cartItems, total }) => ( -