From 476f482657cb1c127113a188a38cc68005972047 Mon Sep 17 00:00:00 2001 From: Micheal O'Donovan Date: Wed, 4 Oct 2023 13:09:37 +0100 Subject: [PATCH] sort snapshot re. styled-components-jest --- .../Molecules/PostcodeLookup/PostcodeLookup.test.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/Molecules/PostcodeLookup/PostcodeLookup.test.js b/src/components/Molecules/PostcodeLookup/PostcodeLookup.test.js index 476caf739..fd42e6dc7 100644 --- a/src/components/Molecules/PostcodeLookup/PostcodeLookup.test.js +++ b/src/components/Molecules/PostcodeLookup/PostcodeLookup.test.js @@ -4,8 +4,12 @@ import 'jest-styled-components'; import renderWithTheme from '../../../hoc/shallowWithTheme'; import PostcodeLookup from './PostcodeLookup'; -it('renders correctly', () => { - const renderer = renderWithTheme( {}} />); +// const goodPostcode = "bs5 6hq"; +// const badPostcode = "555 6hq"; - expect(renderer.toJSON()).toMatchSnapshot(); +it('renders correctly', () => { + const tree = renderWithTheme( + alert(JSON.stringify(address, null, 2))} /> + ).toJSON(); + expect(tree).toMatchSnapshot() });