From 9da0ee7ef20492c5ac4ae1b120a6a168d2d1cb75 Mon Sep 17 00:00:00 2001 From: Vladimir Metnev Date: Sun, 10 Sep 2017 13:54:58 +0300 Subject: [PATCH] feat(Header): add basic test feat(Header): add basic test --- .../components/parts/Header/index.test.jsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/common/components/parts/Header/index.test.jsx b/src/common/components/parts/Header/index.test.jsx index e69de29b..9570ebc9 100644 --- a/src/common/components/parts/Header/index.test.jsx +++ b/src/common/components/parts/Header/index.test.jsx @@ -0,0 +1,18 @@ +import React from 'react' +import Header from 'components/parts/Header' +import {shallow} from 'enzyme' +import toJson from 'enzyme-to-json' + +const props = { + title: 'Dashboard', + toggleSidebar: () => ({}), + isLoggedIn: true, + isMobile: false +} + +describe('Header component', () => { + it('same snapshot at Dashboard on non-mobile screen', () => { + const component = shallow(
) + expect(toJson(component)).toMatchSnapshot() + }) +})