Skip to content

Commit

Permalink
fix snapshot tests and upgrade webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
schnogz committed Jun 8, 2018
1 parent 66a5cf0 commit a5b7927
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
8 changes: 4 additions & 4 deletions package.json
Expand Up @@ -74,7 +74,7 @@
"babel-core": "^6.24.1",
"babel-eslint": "7.2.3",
"babel-istanbul": "^0.12.2",
"babel-jest": "^22.4.1",
"babel-jest": "^23.0.1",
"babel-loader": "^7.0.0",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-module-resolver": "^3.0.0",
Expand Down Expand Up @@ -130,12 +130,12 @@
"redux-saga-test-plan": "^3.6.0",
"rimraf": "^2.6.2",
"standard": "^11.0.1",
"style-loader": "^0.20.3",
"style-loader": "^0.21.0",
"thread-loader": "^1.1.5",
"uglifyjs-webpack-plugin": "^1.2.4",
"webpack": "^4.3.0",
"webpack": "^4.12.0",
"webpack-bundle-analyzer": "^2.11.1",
"webpack-cli": "^2.0.13",
"webpack-cli": "^3.0.3",
"webpack-dev-server": "^3.1.1"
},
"dependencies": {}
Expand Down
Expand Up @@ -5,7 +5,7 @@ import 'jest-styled-components'

describe('Tooltip component', () => {
it('renders correctly', () => {
const component = renderer.create(<Tooltip colors={'primary'}><span>Default</span></Tooltip>)
const component = renderer.create(<Tooltip colors={'primary'} width={100} onMouseEnter={jest.fn()} onMouseLeave={jest.fn()}><span>Default</span></Tooltip>)
const tree = component.toJSON()
expect(tree).toMatchSnapshot()
})
Expand Down
Expand Up @@ -89,18 +89,14 @@ exports[`Tooltip component renders correctly 1`] = `
<div
className="c0"
width={undefined}
width={100}
>
<div
className="c1"
onClick={undefined}
onMouseEnter={undefined}
onMouseLeave={undefined}
/>
<div
className="c2 c3"
onClick={undefined}
width={undefined}
width={100}
>
<span>
Default
Expand Down
Expand Up @@ -7,7 +7,6 @@ exports[`FormItem renders correctly 1`] = `
<label
className="c0"
htmlFor={undefined}
>
<text
size="14px"
Expand Down
Expand Up @@ -6,7 +6,7 @@ jest.mock('blockchain-info-components', () => ({ Text: 'text' }))

describe('FormItem', () => {
it('renders correctly', () => {
const component = renderer.create(<FormItem />)
const component = renderer.create(<FormItem htmlFor={'comp'} />)
const tree = component.toJSON()
expect(tree).toMatchSnapshot()
})
Expand Down

0 comments on commit a5b7927

Please sign in to comment.