diff --git a/src/components/Layout/__snapshots__/test.js.snap b/src/components/Layout/__snapshots__/test.js.snap index 27a00b1..7f80226 100644 --- a/src/components/Layout/__snapshots__/test.js.snap +++ b/src/components/Layout/__snapshots__/test.js.snap @@ -1,26 +1,30 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Layout rendering 1`] = ` - - - - - Example content - - - + Example content + + + + `; diff --git a/src/components/Layout/test.js b/src/components/Layout/test.js index 9ecec6c..8654862 100644 --- a/src/components/Layout/test.js +++ b/src/components/Layout/test.js @@ -1,15 +1,22 @@ +jest.mock('components/SentryBoundary', () => + require('__mocks__/component-mock')('components/SentryBoundary')); +jest.mock('components/Header', () => + require('__mocks__/component-mock')('components/Header')); +jest.mock('components/Footer', () => + require('__mocks__/component-mock')('components/Footer')); + import React from 'react'; -import { shallow } from 'enzyme'; +import { render } from 'react-testing-library'; import { Layout } from 'components/Layout'; describe('Layout', () => { test('rendering', () => { - const component = shallow( + const { asFragment } = render( Example content ); - expect(component).toMatchSnapshot(); + expect(asFragment()).toMatchSnapshot(); }); });