Skip to content
Snippets Groups Projects
Commit bedda108 authored by Alexandros Georgantas's avatar Alexandros Georgantas Committed by john
Browse files

Addeded render test for AlignmentBox

parent 1b455824
No related branches found
No related tags found
No related merge requests found
import React from 'react'
import { shallow } from 'enzyme'
import { shallowToJson } from 'enzyme-to-json'
import sinon from 'sinon'
import AlignmentBox from '../AlignmentBox'
const { data } = global.mock
const type = 'front'
const chapters = data.chapters.filter((chapter) => {
return chapter.division === type
})
let props = {
chapter: chapters[0],
position: 'left',
update: sinon.spy()
}
const getWrapper = () => {
return shallow(<AlignmentBox {...props} />)
}
test('should render correctly', () => {
const wrapper = getWrapper()
const tree = shallowToJson(wrapper)
expect(tree).toMatchSnapshot()
})
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment