From 37e8071e822d2872ccac11f7384e16c1fa3bc69d Mon Sep 17 00:00:00 2001 From: Vladimir Metnev Date: Sun, 10 Sep 2017 13:58:29 +0300 Subject: [PATCH] feat(Sidebar): add basic test feat(Sidebar): add basic test --- .../components/parts/Sidebar/index.test.jsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/common/components/parts/Sidebar/index.test.jsx b/src/common/components/parts/Sidebar/index.test.jsx index e69de29b..48525926 100644 --- a/src/common/components/parts/Sidebar/index.test.jsx +++ b/src/common/components/parts/Sidebar/index.test.jsx @@ -0,0 +1,19 @@ +import React from 'react' +import Sidebar from 'components/parts/Sidebar' +import {shallow} from 'enzyme' +import toJson from 'enzyme-to-json' +import {routes as routing} from 'routing' + +const props = { + isMobile: true, + logout: () => ({}), + routing, + open: true +} + +describe('Sidebar component', () => { + it('same snapshot if Sidebar is open and it is on mobile screen', () => { + const component = shallow() + expect(toJson(component)).toMatchSnapshot() + }) +})