Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Roy Yu committed Mar 8, 2019
1 parent c78fd87 commit b9fc345
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
5 changes: 2 additions & 3 deletions __tests__/common/components/Example.spec.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import React from 'react'
import { fromJS } from 'immutable'
import Enzyme, { shallow } from 'enzyme'

import { Example } from '../../../src/js/common/components/Example'

const fixture = {
example: {
result: fromJS({
result: {
testing: 'data',
}),
},
},
};

Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@
"devDependencies": {
"assets-webpack-plugin": "^3.9.7",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-core": "^6.26.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.1.0",
"babel-jest": "^23.4.0",
"babel-loader": "^7.1.2",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-decorators-legacy": "^1.3.5",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-plugin-typecheck": "^3.9.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-env": "^1.6.1",
"babel-preset-flow": "^6.23.0",
"babel-preset-react": "^6.24.1",
"babel-preset-react-hmre": "^1.1.1",
Expand Down Expand Up @@ -65,14 +65,14 @@
"husky": "^1.3.1",
"identity-obj-proxy": "^3.0.0",
"image-webpack-loader": "^4.6.0",
"jest-cli": "^24.1.0",
"jest-cli": "^23.4.1",
"mini-css-extract-plugin": "^0.5.0",
"postcss-loader": "^3.0.0",
"postcss-preset-env": "^6.5.0",
"precss": "^4.0.0",
"raf": "^3.4.1",
"react-hot-loader": "^4.7.1",
"react-test-renderer": "^16.8.3",
"react-test-renderer": "^16.2.0",
"rimraf": "^2.6.3",
"shelljs": "^0.8.3",
"style-loader": "^0.23.1",
Expand Down
2 changes: 1 addition & 1 deletion src/js/common/components/Example/Example.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Example extends PureComponent {

render() {
const { example } = this.props;
const { result } = example;
const result = (example && example.result) || null;

if (result) {
return (
Expand Down

0 comments on commit b9fc345

Please sign in to comment.