From 2f8ab7de583fe0c206bedc3029227b5c966247aa Mon Sep 17 00:00:00 2001 From: Aanand Prasad <aanand.prasad@gmail.com> Date: Wed, 17 Jan 2018 10:41:48 +0000 Subject: [PATCH] Make dashboard test pass --- packages/component-dashboard/package.json | 2 +- .../src/components/Dashboard.test.js | 9 ++++++--- yarn.lock | 11 +++++------ 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/component-dashboard/package.json b/packages/component-dashboard/package.json index 84286c37b..4cc09c797 100644 --- a/packages/component-dashboard/package.json +++ b/packages/component-dashboard/package.json @@ -43,7 +43,7 @@ "jest": "^22.1.1", "node-sass": "^4.5.3", "react-styleguidist": "^6.0.8", - "react-test-renderer": "^16.2.0", + "react-test-renderer": "^15.6.2", "sass-loader": "^6.0.6", "style-loader": "^0.19.0", "webpack": "^3.8.1", diff --git a/packages/component-dashboard/src/components/Dashboard.test.js b/packages/component-dashboard/src/components/Dashboard.test.js index a9a9e89bf..dfcd1201c 100644 --- a/packages/component-dashboard/src/components/Dashboard.test.js +++ b/packages/component-dashboard/src/components/Dashboard.test.js @@ -11,8 +11,11 @@ jest.mock('config', () => ({ 'pubsweet-client': {} })) describe('Dashboard', () => { it('can render', () => { - // doesn't actually work cos of missing props - const wrapper = shallow(<Dashboard />) - console.log(wrapper.debug()) + const dashboard = { + owner: [], + reviewer: [], + editor: [], + } + shallow(<Dashboard dashboard={dashboard} />) }) }) diff --git a/yarn.lock b/yarn.lock index 5dd0abbf5..eb9f5d314 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8845,13 +8845,12 @@ react-tag-autocomplete@^5.4.1: version "5.5.0" resolved "https://registry.yarnpkg.com/react-tag-autocomplete/-/react-tag-autocomplete-5.5.0.tgz#49841388b88323f6bccb0c10039bd0252875b49f" -react-test-renderer@^16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.2.0.tgz#bddf259a6b8fcd8555f012afc8eacc238872a211" +react-test-renderer@^15.6.2: + version "15.6.2" + resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-15.6.2.tgz#d0333434fc2c438092696ca770da5ed48037efa8" dependencies: - fbjs "^0.8.16" - object-assign "^4.1.1" - prop-types "^15.6.0" + fbjs "^0.8.9" + object-assign "^4.1.0" react@^15.4.4, react@^15.6.1: version "15.6.2" -- GitLab