Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Commit

Permalink
feat(Sidebar): add basic test
Browse files Browse the repository at this point in the history
feat(Sidebar): add basic test
  • Loading branch information
Metnew committed Sep 10, 2017
1 parent 5b9bd47 commit 37e8071
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/common/components/parts/Sidebar/index.test.jsx
Original file line number Diff line number Diff line change
@@ -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(<Sidebar {...props} />)
expect(toJson(component)).toMatchSnapshot()
})
})

0 comments on commit 37e8071

Please sign in to comment.