Skip to content

Commit

Permalink
Update enzyme from 2.8.2 to 3.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vzvu3k6k committed Oct 21, 2018
1 parent 4b16266 commit 2faae12
Show file tree
Hide file tree
Showing 5 changed files with 241 additions and 100 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
},
"homepage": "http://www.gitify.io/",
"jest": {
"setupTestFrameworkScriptFile": "<rootDir>src/js/setup-tests.js",
"coverageThreshold": {
"global": {
"lines": 95
Expand Down Expand Up @@ -101,7 +102,8 @@
"browserify": "=14.4.0",
"electron": "=1.6.10",
"electron-packager": "=8.7.0",
"enzyme": "=2.8.2",
"enzyme": "=3.7.0",
"enzyme-adapter-react-15": "^1.1.1",
"eslint": "=3.19.0",
"eslint-config-dabapps": "github:dabapps/eslint-config-dabapps#v3.1.1",
"eslint-plugin-import": "=2.3.0",
Expand Down
1 change: 0 additions & 1 deletion src/js/__tests__/components/settings-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ describe('components/settings-modal.js', () => {
const wrapper = shallow(<SettingsModal {...props} />);
expect(wrapper).toBeDefined();

wrapper.instance().componentDidMount();
expect(props.toggleSettingsModal).toHaveBeenCalledTimes(1);

wrapper.instance().componentWillUnmount();
Expand Down
1 change: 0 additions & 1 deletion src/js/__tests__/components/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ describe('components/Sidebar.js', () => {

expect(wrapper).toBeDefined();

wrapper.instance().componentDidMount();
clock.runTimersToTime(60000);
expect(props.fetchNotifications).toHaveBeenCalledTimes(1);
});
Expand Down
4 changes: 4 additions & 0 deletions src/js/setup-tests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-15';

configure({ adapter: new Adapter() });
Loading

0 comments on commit 2faae12

Please sign in to comment.