From 7c3bf35f7fafed84679298855da1f7af8d005346 Mon Sep 17 00:00:00 2001 From: Zack Stickles Date: Wed, 13 May 2020 15:11:15 -0700 Subject: [PATCH] feat: example component snapshot test --- src/components/__tests__/Footer.js | 16 ++++++++++ .../__tests__/__snapshots__/Footer.js.snap | 32 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 src/components/__tests__/Footer.js create mode 100644 src/components/__tests__/__snapshots__/Footer.js.snap diff --git a/src/components/__tests__/Footer.js b/src/components/__tests__/Footer.js new file mode 100644 index 000000000..384d631dc --- /dev/null +++ b/src/components/__tests__/Footer.js @@ -0,0 +1,16 @@ +import React from 'react'; +import renderer from 'react-test-renderer'; + +import Footer from '../Footer'; + +describe('Footer', () => { + it('renders correctly', () => { + const pages = [ + { displayName: 'One', url: '/one' }, + { displayName: 'Two', url: '/two' }, + ]; + const tree = renderer.create(