From 47ee62d3876cf0da8fbe4289e9b3a8cbce86c995 Mon Sep 17 00:00:00 2001 From: Jeff Avallone Date: Thu, 31 Jan 2019 21:15:11 -0500 Subject: [PATCH] Tests for Pin rendering component --- src/rendering/Pin/__snapshots__/test.js.snap | 25 ++++++++++++++++++++ src/rendering/Pin/test.js | 20 ++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 src/rendering/Pin/__snapshots__/test.js.snap create mode 100644 src/rendering/Pin/test.js diff --git a/src/rendering/Pin/__snapshots__/test.js.snap b/src/rendering/Pin/__snapshots__/test.js.snap new file mode 100644 index 0000000..25a041b --- /dev/null +++ b/src/rendering/Pin/__snapshots__/test.js.snap @@ -0,0 +1,25 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Pin layout 1`] = ` +Object { + "box": Object { + "height": 10, + "width": 10, + }, + "type": "Pin", +} +`; + +exports[`Pin rendering 1`] = ` + +`; diff --git a/src/rendering/Pin/test.js b/src/rendering/Pin/test.js new file mode 100644 index 0000000..326e81f --- /dev/null +++ b/src/rendering/Pin/test.js @@ -0,0 +1,20 @@ +import React from 'react'; +import { shallow } from 'enzyme'; + +import Pin, { layout } from 'rendering/Pin'; + +describe('Pin', () => { + test('rendering', () => { + const component = shallow( + + ); + expect(component).toMatchSnapshot(); + }); + + test('layout', () => { + const processed = layout({ + type: 'Pin' + }); + expect(processed).toMatchSnapshot(); + }); +});