Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Fix) Update snapshots for unit test in v2 #855

Merged
merged 3 commits into from
May 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/components/Common/TokenDecimals.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react'
import { TokenDecimals } from './TokenDecimals'
import { Form } from 'react-final-form'
import renderer from 'react-test-renderer'
import Adapter from 'enzyme-adapter-react-15'
import { configure, mount, shallow } from 'enzyme'
import { VALIDATION_MESSAGES } from '../../utils/constants'
Expand All @@ -9,14 +10,14 @@ configure({ adapter: new Adapter() })

describe('TokenDecimals', () => {
it(`should render TokenDecimals component`, () => {
const wrapper = shallow(
const wrapper = renderer.create(
<Form onSubmit={jest.fn()} component={TokenDecimals} errorStyle={{ color: 'red', fontWeight: 'bold', }}/>
)
expect(wrapper).toMatchSnapshot()
})

it(`should render TokenDecimals component and its children`, () => {
const wrapper = mount(
const wrapper = renderer.create(
<Form onSubmit={jest.fn()} component={TokenDecimals} errorStyle={{ color: 'red', fontWeight: 'bold', }}/>
)
expect(wrapper).toMatchSnapshot()
Expand Down
5 changes: 3 additions & 2 deletions src/components/Common/TokenName.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react'
import { TokenName } from './TokenName'
import { Form } from 'react-final-form'
import renderer from 'react-test-renderer'
import Adapter from 'enzyme-adapter-react-15'
import { configure, mount, shallow } from 'enzyme'
import { VALIDATION_MESSAGES } from '../../utils/constants'
Expand All @@ -9,14 +10,14 @@ configure({ adapter: new Adapter() })

describe('TokenName', () => {
it(`should render TokenName component`, () => {
const wrapper = shallow(
const wrapper = renderer.create(
<Form onSubmit={jest.fn()} component={TokenName} errorStyle={{ color: 'red', fontWeight: 'bold', }}/>
)
expect(wrapper).toMatchSnapshot()
})

it(`should render TokenName component and its children`, () => {
const wrapper = mount(
const wrapper = renderer.create(
<Form onSubmit={jest.fn()} component={TokenName} errorStyle={{ color: 'red', fontWeight: 'bold', }}/>
)
expect(wrapper).toMatchSnapshot()
Expand Down
5 changes: 3 additions & 2 deletions src/components/Common/TokenSupply.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react'
import { TokenDecimals } from './TokenDecimals'
import { Form } from 'react-final-form'
import renderer from 'react-test-renderer'
import Adapter from 'enzyme-adapter-react-15'
import { configure, mount, shallow } from 'enzyme'
import { VALIDATION_MESSAGES } from '../../utils/constants'
Expand All @@ -9,14 +10,14 @@ configure({ adapter: new Adapter() })

describe('TokenDecimals', () => {
it(`should render TokenDecimals component`, () => {
const wrapper = shallow(
const wrapper = renderer.create(
<Form onSubmit={jest.fn()} component={TokenDecimals} errorStyle={{ color: 'red', fontWeight: 'bold', }}/>
)
expect(wrapper).toMatchSnapshot()
})

it(`should render TokenDecimals component and its children`, () => {
const wrapper = mount(
const wrapper = renderer.create(
<Form onSubmit={jest.fn()} component={TokenDecimals} errorStyle={{ color: 'red', fontWeight: 'bold', }}/>
)
expect(wrapper).toMatchSnapshot()
Expand Down
5 changes: 3 additions & 2 deletions src/components/Common/TokenTicker.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react'
import { TokenTicker } from './TokenTicker'
import { Form } from 'react-final-form'
import renderer from 'react-test-renderer'
import Adapter from 'enzyme-adapter-react-15'
import { configure, mount, shallow } from 'enzyme'
import { VALIDATION_MESSAGES } from '../../utils/constants'
Expand All @@ -9,14 +10,14 @@ configure({ adapter: new Adapter() })

describe('TokenTicker', () => {
it(`should render TokenTicker component`, () => {
const wrapper = shallow(
const wrapper = renderer.create(
<Form onSubmit={jest.fn()} component={TokenTicker} errorStyle={{ color: 'red', fontWeight: 'bold', }}/>
)
expect(wrapper).toMatchSnapshot()
})

it(`should render TokenTicker component and its children`, () => {
const wrapper = mount(
const wrapper = renderer.create(
<Form onSubmit={jest.fn()} component={TokenTicker} errorStyle={{ color: 'red', fontWeight: 'bold', }}/>
)
expect(wrapper).toMatchSnapshot()
Expand Down
Loading