Skip to content
Snippets Groups Projects
Commit 7d1372f3 authored by Alexandros Georgantas's avatar Alexandros Georgantas
Browse files

Clean ups and new snapshots

parent 768fbc0e
No related branches found
No related tags found
No related merge requests found
import React from 'react'
import { shallow } from 'enzyme'
import renderer from 'react-test-renderer'
import Menu from '../src/atoms/Menu'
......@@ -9,16 +8,9 @@ const props = {
value: 'foo',
}
const wrapper = shallow(<Menu {...props} />)
describe('Menu', () => {
test('Snapshot', () => {
test('is rendered correctly', () => {
const tree = renderer.create(<Menu {...props} />).toJSON()
expect(tree).toMatchSnapshot()
})
test('Renders a Menu', () => {
expect(wrapper.is('div')).toBeTruthy()
expect(wrapper).toHaveLength(1)
})
})
......@@ -15,7 +15,7 @@ const props = {
const wrapper = shallow(<Radio {...props} />)
describe('Radio', () => {
test('Snapshot', () => {
test('is rendered correctly', () => {
const tree = renderer.create(<Radio {...props} />).toJSON()
expect(tree).toMatchSnapshot()
})
......
......@@ -30,14 +30,12 @@ const wrapper = shallow(<RadioGroup {...props} />)
const radios = wrapper.find(Radio)
describe('Radio Group', () => {
test('Snapshot', () => {
test('is rendered correctly', () => {
const tree = renderer.create(<RadioGroup {...props} />).toJSON()
expect(tree).toMatchSnapshot()
})
test('Renders a number of radio buttons', () => {
expect(wrapper.is('div')).toBeTruthy()
const len = props.options.length
expect(wrapper.children()).toHaveLength(len)
......
......@@ -14,7 +14,7 @@ const wrapper = shallow(<YesOrNo {...props} />)
const radio = wrapper.find(RadioGroup)
describe('Yes or No', () => {
test('Snapshot', () => {
test('is rendered correclty', () => {
const tree = renderer.create(<YesOrNo {...props} />).toJSON()
expect(tree).toMatchSnapshot()
})
......
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Menu Snapshot 1`] = `
exports[`Menu is rendered correctly 1`] = `
<div
className="root"
>
......
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Radio Snapshot 1`] = `
exports[`Radio is rendered correctly 1`] = `
<label
className="root"
style={
......
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Radio Group Snapshot 1`] = `
exports[`Radio Group is rendered correctly 1`] = `
<div>
<label
className="root"
......
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Yes or No Snapshot 1`] = `
exports[`Yes or No is rendered correclty 1`] = `
<div>
<label
className="root inline"
......
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