From cd00227875188da45414e0a5f0317b2935191507 Mon Sep 17 00:00:00 2001 From: Jonathan Belcher Date: Mon, 12 Nov 2018 16:49:32 -0500 Subject: [PATCH] Adds Card Snapshot (https://github.com/woocommerce/woocommerce-admin/pull/821) --- .../card/test/__snapshots__/index.js.snap | 20 +++++++++++++++++++ .../client/components/card/test/index.js | 7 ++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 plugins/woocommerce-admin/client/components/card/test/__snapshots__/index.js.snap diff --git a/plugins/woocommerce-admin/client/components/card/test/__snapshots__/index.js.snap b/plugins/woocommerce-admin/client/components/card/test/__snapshots__/index.js.snap new file mode 100644 index 00000000000..74c3fce3b4a --- /dev/null +++ b/plugins/woocommerce-admin/client/components/card/test/__snapshots__/index.js.snap @@ -0,0 +1,20 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Card it renders correctly 1`] = ` +
+
+

+ A Card Example +

+
+
+
+`; diff --git a/plugins/woocommerce-admin/client/components/card/test/index.js b/plugins/woocommerce-admin/client/components/card/test/index.js index 80d75cf3681..a5fad0da225 100644 --- a/plugins/woocommerce-admin/client/components/card/test/index.js +++ b/plugins/woocommerce-admin/client/components/card/test/index.js @@ -3,7 +3,7 @@ * * @format */ - +import renderer from 'react-test-renderer'; import { shallow } from 'enzyme'; /** @@ -12,6 +12,11 @@ import { shallow } from 'enzyme'; import Card from '../'; describe( 'Card', () => { + test( 'it renders correctly', () => { + const tree = renderer.create( ).toJSON(); + expect( tree ).toMatchSnapshot(); + } ); + test( 'should have correct title', () => { const card = ; expect( card.props.title ).toBe( 'A Card Example' );