Skip to content

Commit

Permalink
Merge 886a181 into 1dc8091
Browse files Browse the repository at this point in the history
  • Loading branch information
richardscarrott committed May 2, 2017
2 parents 1dc8091 + 886a181 commit ed55474
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -16,7 +16,8 @@
"heroku-postbuild": "npm run build"
},
"author": "",
"license": "ISC",
"license": "MIT",
"homepage": "https://sixtyframes-react-boilerplate.herokuapp.com",
"devDependencies": {
"async": "^2.1.5",
"autoprefixer": "^6.7.7",
Expand Down Expand Up @@ -47,7 +48,6 @@
"postcss-loader": "^1.3.3",
"prettier": "^1.2.2",
"progress-bar-webpack-plugin": "^1.9.3",
"react": "^15.4.2",
"react-hot-loader": "^3.0.0-beta.1",
"react-test-renderer": "^15.4.2",
"redux-mock-store": "^1.2.2",
Expand Down
2 changes: 1 addition & 1 deletion src/components/index/Index.js
Expand Up @@ -31,7 +31,7 @@ Index.fetchData = function({ dispatch }) {
Index.propTypes = {
dispatch: PropTypes.func.isRequired,
isFetching: PropTypes.bool.isRequired,
error: PropTypes.bool.isRequired,
error: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]).isRequired,
value: PropTypes.string
};

Expand Down
9 changes: 7 additions & 2 deletions src/components/index/Index.test.js
Expand Up @@ -7,15 +7,20 @@ import { Index } from 'components/index/Index';
describe('components/index/Index', () => {
it('renders a quote', () => {
const component = renderer.create(
<Index value="A quote" dispatch={jest.fn()} isFetching={false} />
<Index
value="A quote"
dispatch={jest.fn()}
isFetching={false}
error={false}
/>
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});

it('renders a loading indicator', () => {
const component = renderer.create(
<Index isFetching dispatch={jest.fn()} />
<Index isFetching dispatch={jest.fn()} error={false} />
);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
Expand Down

0 comments on commit ed55474

Please sign in to comment.