commit: 39ea5c0e2e9bdf2c6e3bd0797e6fb422e6117aa2
parent: 509b0cfafc0857538d63f4b93b26462f035d458b
Author: Yamagishi Kazutoshi <ykzts@desire.sh>
Date:   Fri,  2 Jun 2017 00:27:15 +0900
Improve tests for JavaScript (#3496)
- Upgrade dependencies
    - chai (3.5.0 -> 4.0.1)
    - chai-enzyme (0.6.1 -> 0.7.1)
    - sinon (2.2.0 -> 2.3.2)
- Change extensions from .jsx to .js
- Don't assign `React` to `global`
- Check code format using ESLint
Diffstat:
15 files changed, 292 insertions(+), 284 deletions(-)
diff --git a/package.json b/package.json
@@ -9,8 +9,8 @@
     "start": "rimraf ./tmp/streaming && babel ./streaming/index.js --out-dir ./tmp && node ./tmp/streaming/index.js",
     "storybook": "NODE_ENV=test start-storybook -p 9001 -c storybook",
     "test": "npm run test:lint && npm run test:mocha",
-    "test:lint": "eslint -c .eslintrc.yml --ext=js app/javascript/ config/webpack/ storyboard/ streaming/",
-    "test:mocha": "NODE_ENV=test mocha --require ./spec/javascript/setup.js --compilers js:babel-register ./spec/javascript/components/*.test.jsx",
+    "test:lint": "eslint -c .eslintrc.yml --ext=js app/javascript/ config/webpack/ spec/javascript/ storyboard/ streaming/",
+    "test:mocha": "NODE_ENV=test mocha --require ./spec/javascript/setup.js --compilers js:babel-register ./spec/javascript/components/*.test.js",
     "postinstall": "npm rebuild node-sass"
   },
   "repository": {
@@ -116,8 +116,8 @@
   "devDependencies": {
     "@kadira/storybook": "^2.35.3",
     "babel-eslint": "^7.2.3",
-    "chai": "^3.5.0",
-    "chai-enzyme": "^0.6.1",
+    "chai": "^4.0.1",
+    "chai-enzyme": "^0.7.1",
     "enzyme": "^2.8.2",
     "eslint": "^3.19.0",
     "eslint-plugin-jsx-a11y": "^4.0.0",
@@ -127,7 +127,7 @@
     "mocha": "^3.4.1",
     "react-intl-translations-manager": "^5.0.0",
     "react-test-renderer": "^15.5.4",
-    "sinon": "^2.2.0",
+    "sinon": "^2.3.2",
     "webpack-dev-server": "^2.4.5"
   },
   "optionalDependencies": {
diff --git a/spec/javascript/components/avatar.test.js b/spec/javascript/components/avatar.test.js
@@ -0,0 +1,20 @@
+import { expect } from 'chai';
+import { render } from 'enzyme';
+import React from 'react';
+import Avatar from '../../../app/javascript/mastodon/components/avatar';
+
+describe('<Avatar />', () => {
+  const src = '/path/to/image.jpg';
+  const size = 100;
+  const wrapper = render(<Avatar src={src} animate size={size} />);
+
+  it('renders a div element with the given src as background', () => {
+    expect(wrapper.find('div')).to.have.style('background-image', `url(${src})`);
+  });
+
+  it('renders a div element of the given size', () => {
+    ['width', 'height'].map((attr) => {
+      expect(wrapper.find('div')).to.have.style(attr, `${size}px`);
+    });
+  });
+});
diff --git a/spec/javascript/components/avatar.test.jsx b/spec/javascript/components/avatar.test.jsx
@@ -1,20 +0,0 @@
-import { expect } from 'chai';
-import { render } from 'enzyme';
-
-import Avatar from '../../../app/javascript/mastodon/components/avatar'
-
-describe('<Avatar />', () => {
-  const src = '/path/to/image.jpg';
-  const size = 100;
-  const wrapper = render(<Avatar src={src} animate size={size} />);
-
-  it('renders a div element with the given src as background', () => {
-    expect(wrapper.find('div')).to.have.style('background-image', `url(${src})`);
-  });
-
-  it('renders a div element of the given size', () => {
-    ['width', 'height'].map((attr) => {
-      expect(wrapper.find('div')).to.have.style(attr, `${size}px`);
-    });
-  });
-});
diff --git a/spec/javascript/components/button.test.js b/spec/javascript/components/button.test.js
@@ -0,0 +1,71 @@
+import { expect } from 'chai';
+import { shallow } from 'enzyme';
+import sinon from 'sinon';
+import React from 'react';
+import Button from '../../../app/javascript/mastodon/components/button';
+
+describe('<Button />', () => {
+  it('renders a button element', () => {
+    const wrapper = shallow(<Button />);
+    expect(wrapper).to.match('button');
+  });
+
+  it('renders the given text', () => {
+    const text = 'foo';
+    const wrapper = shallow(<Button text={text} />);
+    expect(wrapper.find('button')).to.have.text(text);
+  });
+
+  it('handles click events using the given handler', () => {
+    const handler = sinon.spy();
+    const wrapper = shallow(<Button onClick={handler} />);
+    wrapper.find('button').simulate('click');
+    expect(handler.calledOnce).to.equal(true);
+  });
+
+  it('does not handle click events if props.disabled given', () => {
+    const handler = sinon.spy();
+    const wrapper = shallow(<Button onClick={handler} disabled />);
+    wrapper.find('button').simulate('click');
+    expect(handler.called).to.equal(false);
+  });
+
+  it('renders a disabled attribute if props.disabled given', () => {
+    const wrapper = shallow(<Button disabled />);
+    expect(wrapper.find('button')).to.be.disabled();
+  });
+
+  it('renders the children', () => {
+    const children = <p>children</p>;
+    const wrapper = shallow(<Button>{children}</Button>);
+    expect(wrapper.find('button')).to.contain(children);
+  });
+
+  it('renders the props.text instead of children', () => {
+    const text = 'foo';
+    const children = <p>children</p>;
+    const wrapper = shallow(<Button text={text}>{children}</Button>);
+    expect(wrapper.find('button')).to.have.text(text);
+    expect(wrapper.find('button')).to.not.contain(children);
+  });
+
+  it('renders style="display: block; width: 100%;" if props.block given', () => {
+    const wrapper = shallow(<Button block />);
+    expect(wrapper.find('button')).to.have.className('button--block');
+  });
+
+  it('renders style="display: inline-block; width: auto;" by default', () => {
+    const wrapper = shallow(<Button />);
+    expect(wrapper.find('button')).to.not.have.className('button--block');
+  });
+
+  it('adds class "button-secondary" if props.secondary given', () => {
+    const wrapper = shallow(<Button secondary />);
+    expect(wrapper.find('button')).to.have.className('button-secondary');
+  });
+
+  it('does not add class "button-secondary" by default', () => {
+    const wrapper = shallow(<Button />);
+    expect(wrapper.find('button')).to.not.have.className('button-secondary');
+  });
+});
diff --git a/spec/javascript/components/button.test.jsx b/spec/javascript/components/button.test.jsx
@@ -1,71 +0,0 @@
-import { expect } from 'chai';
-import { shallow } from 'enzyme';
-import sinon from 'sinon';
-
-import Button from '../../../app/javascript/mastodon/components/button';
-
-describe('<Button />', () => {
-  it('renders a button element', () => {
-    const wrapper = shallow(<Button />);
-    expect(wrapper).to.match('button');
-  });
-
-  it('renders the given text', () => {
-    const text = 'foo';
-    const wrapper = shallow(<Button text={text} />);
-    expect(wrapper.find('button')).to.have.text(text);
-  });
-
-  it('handles click events using the given handler', () => {
-    const handler = sinon.spy();
-    const wrapper = shallow(<Button onClick={handler} />);
-    wrapper.find('button').simulate('click');
-    expect(handler.calledOnce).to.equal(true);
-  });
-
-  it('does not handle click events if props.disabled given', () => {
-    const handler = sinon.spy();
-    const wrapper = shallow(<Button onClick={handler} disabled />);
-    wrapper.find('button').simulate('click');
-    expect(handler.called).to.equal(false);
-  });
-
-  it('renders a disabled attribute if props.disabled given', () => {
-    const wrapper = shallow(<Button disabled />);
-    expect(wrapper.find('button')).to.be.disabled();
-  });
-
-  it('renders the children', () => {
-    const children = <p>children</p>;
-    const wrapper = shallow(<Button>{children}</Button>);
-    expect(wrapper.find('button')).to.contain(children);
-  });
-
-  it('renders the props.text instead of children', () => {
-    const text = 'foo';
-    const children = <p>children</p>;
-    const wrapper = shallow(<Button text={text}>{children}</Button>);
-    expect(wrapper.find('button')).to.have.text(text);
-    expect(wrapper.find('button')).to.not.contain(children);
-  });
-
-  it('renders style="display: block; width: 100%;" if props.block given', () => {
-    const wrapper = shallow(<Button block />);
-    expect(wrapper.find('button')).to.have.className('button--block');
-  });
-
-  it('renders style="display: inline-block; width: auto;" by default', () => {
-    const wrapper = shallow(<Button />);
-    expect(wrapper.find('button')).to.not.have.className('button--block');
-  });
-
-  it('adds class "button-secondary" if props.secondary given', () => {
-    const wrapper = shallow(<Button secondary />);
-    expect(wrapper.find('button')).to.have.className('button-secondary');
-  });
-
-  it('does not add class "button-secondary" by default', () => {
-    const wrapper = shallow(<Button />);
-    expect(wrapper.find('button')).to.not.have.className('button-secondary');
-  });
-});
diff --git a/spec/javascript/components/display_name.test.js b/spec/javascript/components/display_name.test.js
@@ -0,0 +1,27 @@
+import { expect } from 'chai';
+import { render } from 'enzyme';
+import Immutable  from 'immutable';
+import React from 'react';
+import DisplayName from '../../../app/javascript/mastodon/components/display_name';
+
+describe('<DisplayName />', () => {
+  it('renders display name + account name', () => {
+    const account = Immutable.fromJS({
+      username: 'bar',
+      acct: 'bar@baz',
+      display_name: 'Foo',
+    });
+    const wrapper = render(<DisplayName account={account} />);
+    expect(wrapper).to.have.text('Foo @bar@baz');
+  });
+
+  it('renders the username + account name if display name is empty', () => {
+    const account = Immutable.fromJS({
+      username: 'bar',
+      acct: 'bar@baz',
+      display_name: '',
+    });
+    const wrapper = render(<DisplayName account={account} />);
+    expect(wrapper).to.have.text('bar @bar@baz');
+  });
+});
diff --git a/spec/javascript/components/display_name.test.jsx b/spec/javascript/components/display_name.test.jsx
@@ -1,27 +0,0 @@
-import { expect } from 'chai';
-import { render } from 'enzyme';
-import Immutable  from 'immutable';
-
-import DisplayName from '../../../app/javascript/mastodon/components/display_name'
-
-describe('<DisplayName />', () => {
-  it('renders display name + account name', () => {
-    const account = Immutable.fromJS({
-      username: 'bar',
-      acct: 'bar@baz',
-      display_name: 'Foo'
-    });
-    const wrapper = render(<DisplayName account={account} />);
-    expect(wrapper).to.have.text('Foo @bar@baz');
-  });
-
-  it('renders the username + account name if display name is empty', () => {
-    const account = Immutable.fromJS({
-      username: 'bar',
-      acct: 'bar@baz',
-      display_name: ''
-    });
-    const wrapper = render(<DisplayName account={account} />);
-    expect(wrapper).to.have.text('bar @bar@baz');
-  });
-});
diff --git a/spec/javascript/components/dropdown_menu.test.js b/spec/javascript/components/dropdown_menu.test.js
@@ -0,0 +1,97 @@
+import { expect } from 'chai';
+import { shallow, mount } from 'enzyme';
+import sinon from 'sinon';
+import React from 'react';
+import DropdownMenu from '../../../app/javascript/mastodon/components/dropdown_menu';
+import Dropdown, { DropdownTrigger, DropdownContent } from 'react-simple-dropdown';
+
+describe('<DropdownMenu />', () => {
+  const icon = 'my-icon';
+  const size = 123;
+  const action = sinon.spy();
+
+  const items = [
+    { text: 'first item',  action: action, href: '/some/url' },
+    { text: 'second item', action: 'noop' },
+  ];
+  const wrapper = shallow(<DropdownMenu icon={icon} items={items} size={size} />);
+
+  it('contains one <Dropdown />', () => {
+    expect(wrapper).to.have.exactly(1).descendants(Dropdown);
+  });
+
+  it('contains one <DropdownTrigger />', () => {
+    expect(wrapper.find(Dropdown)).to.have.exactly(1).descendants(DropdownTrigger);
+  });
+
+  it('contains one <DropdownContent />', () => {
+    expect(wrapper.find(Dropdown)).to.have.exactly(1).descendants(DropdownContent);
+  });
+
+  it('uses props.size for <DropdownTrigger /> style values', () => {
+    ['font-size', 'width', 'line-height'].map((property) => {
+      expect(wrapper.find(DropdownTrigger)).to.have.style(property, `${size}px`);
+    });
+  });
+
+  it('uses props.icon as icon class name', () => {
+    expect(wrapper.find(DropdownTrigger).find('i')).to.have.className(`fa-${icon}`);
+  });
+
+  it('is not expanded by default', () => {
+    expect(wrapper.state('expanded')).to.be.equal(false);
+  });
+
+  it('does not render the list elements if not expanded', () => {
+    const lis = wrapper.find(DropdownContent).find('li');
+    expect(lis.length).to.be.equal(0);
+  });
+
+  it('sets expanded to true when clicking the trigger', () => {
+    const wrapper = mount(<DropdownMenu icon={icon} items={items} size={size} />);
+    wrapper.find(DropdownTrigger).first().simulate('click');
+    expect(wrapper.state('expanded')).to.be.equal(true);
+  });
+
+  // Error: ReactWrapper::state() can only be called on the root
+  /*it('sets expanded to false when clicking outside', () => {
+    const wrapper = mount((
+      <div>
+        <DropdownMenu icon={icon} items={items} size={size} />
+        <span />
+      </div>
+    ));
+
+    wrapper.find(DropdownTrigger).first().simulate('click');
+    expect(wrapper.find(DropdownMenu).first().state('expanded')).to.be.equal(true);
+
+    wrapper.find('span').first().simulate('click');
+    expect(wrapper.find(DropdownMenu).first().state('expanded')).to.be.equal(false);
+  })*/
+
+  it('renders list elements for each props.items if expanded', () => {
+    const wrapper = mount(<DropdownMenu icon={icon} items={items} size={size} />);
+    wrapper.find(DropdownTrigger).first().simulate('click');
+    const lis = wrapper.find(DropdownContent).find('li');
+    expect(lis.length).to.be.equal(items.length);
+  });
+
+  it('uses the href passed in via props.items', () => {
+    wrapper
+      .find(DropdownContent).find('li a')
+      .forEach((a, i) => expect(a).to.have.attr('href', items[i].href));
+  });
+
+  it('uses the text passed in via props.items', () => {
+    wrapper
+      .find(DropdownContent).find('li a')
+      .forEach((a, i) => expect(a).to.have.text(items[i].text));
+  });
+
+  it('uses the action passed in via props.items as click handler', () => {
+    const wrapper = mount(<DropdownMenu icon={icon} items={items} size={size} />);
+    wrapper.find(DropdownTrigger).first().simulate('click');
+    wrapper.find(DropdownContent).find('li a').first().simulate('click');
+    expect(action.calledOnce).to.equal(true);
+  });
+});
diff --git a/spec/javascript/components/dropdown_menu.test.jsx b/spec/javascript/components/dropdown_menu.test.jsx
@@ -1,97 +0,0 @@
-import { expect } from 'chai';
-import { shallow, mount } from 'enzyme';
-import sinon from 'sinon';
-
-import DropdownMenu from '../../../app/javascript/mastodon/components/dropdown_menu';
-import Dropdown, { DropdownTrigger, DropdownContent } from 'react-simple-dropdown';
-
-describe('<DropdownMenu />', () => {
-  const icon = 'my-icon';
-  const size = 123;
-  const action = sinon.spy();
-
-  const items = [
-    { text: 'first item',  action: action, href: '/some/url' },
-    { text: 'second item', action: 'noop' }
-  ];
-  const wrapper = shallow(<DropdownMenu icon={icon} items={items} size={size} />);
-
-  it('contains one <Dropdown />', () => {
-    expect(wrapper).to.have.exactly(1).descendants(Dropdown);
-  });
-
-  it('contains one <DropdownTrigger />', () => {
-    expect(wrapper.find(Dropdown)).to.have.exactly(1).descendants(DropdownTrigger);
-  });
-
-  it('contains one <DropdownContent />', () => {
-    expect(wrapper.find(Dropdown)).to.have.exactly(1).descendants(DropdownContent);
-  });
-
-  it('uses props.size for <DropdownTrigger /> style values', () => {
-    ['font-size', 'width', 'line-height'].map((property) => {
-      expect(wrapper.find(DropdownTrigger)).to.have.style(property, `${size}px`);
-    });
-  });
-
-  it('uses props.icon as icon class name', () => {
-    expect(wrapper.find(DropdownTrigger).find('i')).to.have.className(`fa-${icon}`)
-  });
-
-  it('is not expanded by default', () => {
-    expect(wrapper.state('expanded')).to.be.equal(false);
-  })
-
-  it('does not render the list elements if not expanded', () => {
-    const lis = wrapper.find(DropdownContent).find('li');
-    expect(lis.length).to.be.equal(0);
-  })
-
-  it('sets expanded to true when clicking the trigger', () => {
-    const wrapper = mount(<DropdownMenu icon={icon} items={items} size={size} />);
-    wrapper.find(DropdownTrigger).first().simulate('click');
-    expect(wrapper.state('expanded')).to.be.equal(true);
-  })
-
-  // Error: ReactWrapper::state() can only be called on the root
-  /*it('sets expanded to false when clicking outside', () => {
-    const wrapper = mount((
-      <div>
-        <DropdownMenu icon={icon} items={items} size={size} />
-        <span />
-      </div>
-    ));
-
-    wrapper.find(DropdownTrigger).first().simulate('click');
-    expect(wrapper.find(DropdownMenu).first().state('expanded')).to.be.equal(true);
-
-    wrapper.find('span').first().simulate('click');
-    expect(wrapper.find(DropdownMenu).first().state('expanded')).to.be.equal(false);
-  })*/
-
-  it('renders list elements for each props.items if expanded', () => {
-    const wrapper = mount(<DropdownMenu icon={icon} items={items} size={size} />);
-    wrapper.find(DropdownTrigger).first().simulate('click');
-    const lis = wrapper.find(DropdownContent).find('li');
-    expect(lis.length).to.be.equal(items.length);
-  });
-
-  it('uses the href passed in via props.items', () => {
-    wrapper
-      .find(DropdownContent).find('li a')
-      .forEach((a, i) => expect(a).to.have.attr('href', items[i].href));
-  });
-
-  it('uses the text passed in via props.items', () => {
-    wrapper
-      .find(DropdownContent).find('li a')
-      .forEach((a, i) => expect(a).to.have.text(items[i].text));
-  });
-
-  it('uses the action passed in via props.items as click handler', () => {
-    const wrapper = mount(<DropdownMenu icon={icon} items={items} size={size} />);
-    wrapper.find(DropdownTrigger).first().simulate('click');
-    wrapper.find(DropdownContent).find('li a').first().simulate('click');
-    expect(action.calledOnce).to.equal(true);
-  });
-});
diff --git a/spec/javascript/components/features/ui/components/column.test.js b/spec/javascript/components/features/ui/components/column.test.js
@@ -0,0 +1,30 @@
+import { expect } from 'chai';
+import { mount } from 'enzyme';
+import sinon from 'sinon';
+import React from 'react';
+import Column from '../../../../../../app/javascript/mastodon/features/ui/components/column';
+import ColumnHeader from '../../../../../../app/javascript/mastodon/features/ui/components/column_header';
+
+describe('<Column />', () => {
+  describe('<ColumnHeader /> click handler', () => {
+    beforeEach(() => {
+      global.requestAnimationFrame = sinon.spy();
+    });
+
+    it('runs the scroll animation if the column contains scrollable content', () => {
+      const wrapper = mount(
+        <Column heading="notifications">
+          <div className="scrollable" />
+        </Column>
+      );
+      wrapper.find(ColumnHeader).simulate('click');
+      expect(global.requestAnimationFrame.called).to.equal(true);
+    });
+
+    it('does not try to scroll if there is no scrollable content', () => {
+      const wrapper = mount(<Column heading="notifications" />);
+      wrapper.find(ColumnHeader).simulate('click');
+      expect(global.requestAnimationFrame.called).to.equal(false);
+    });
+  });
+});
diff --git a/spec/javascript/components/features/ui/components/column.test.jsx b/spec/javascript/components/features/ui/components/column.test.jsx
@@ -1,30 +0,0 @@
-import { expect } from 'chai';
-import { mount } from 'enzyme';
-import sinon from 'sinon';
-
-import Column from '../../../../../../app/javascript/mastodon/features/ui/components/column';
-import ColumnHeader from '../../../../../../app/javascript/mastodon/features/ui/components/column_header';
-
-describe('<Column />', () => {
-  describe('<ColumnHeader /> click handler', () => {
-    beforeEach(() => {
-      global.requestAnimationFrame = sinon.spy();
-    });
-
-    it('runs the scroll animation if the column contains scrollable content', () => {
-      const wrapper = mount(
-        <Column heading="notifications">
-          <div className="scrollable" />
-        </Column>
-      );
-      wrapper.find(ColumnHeader).simulate('click');
-      expect(global.requestAnimationFrame.called).to.equal(true);
-    });
-
-    it('does not try to scroll if there is no scrollable content', () => {
-      const wrapper = mount(<Column heading="notifications" />);
-      wrapper.find(ColumnHeader).simulate('click');
-      expect(global.requestAnimationFrame.called).to.equal(false);
-    });
-  });
-});
diff --git a/spec/javascript/components/loading_indicator.test.js b/spec/javascript/components/loading_indicator.test.js
@@ -0,0 +1,8 @@
+import { expect } from 'chai';
+import { shallow } from 'enzyme';
+import React from 'react';
+import LoadingIndicator from '../../../app/javascript/mastodon/components/loading_indicator';
+
+describe('<LoadingIndicator />', () => {
+
+});
diff --git a/spec/javascript/components/loading_indicator.test.jsx b/spec/javascript/components/loading_indicator.test.jsx
@@ -1,8 +0,0 @@
-import { expect } from 'chai';
-import { shallow } from 'enzyme';
-
-import LoadingIndicator from '../../../app/javascript/mastodon/components/loading_indicator'
-
-describe('<LoadingIndicator />', () => {
-
-});
diff --git a/spec/javascript/setup.js b/spec/javascript/setup.js
@@ -15,8 +15,5 @@ Object.keys(document.defaultView).forEach((property) => {
 });
 
 global.navigator = {
-  userAgent: 'node.js'
+  userAgent: 'node.js',
 };
-
-var React    = window.React    = global.React    = require('react');
-var ReactDOM = window.ReactDOM = global.ReactDOM = require('react-dom');
diff --git a/yarn.lock b/yarn.lock
@@ -1494,20 +1494,23 @@ center-align@^0.1.1:
     align-text "^0.1.3"
     lazy-cache "^1.0.3"
 
-chai-enzyme@^0.6.1:
-  version "0.6.1"
-  resolved "https://registry.yarnpkg.com/chai-enzyme/-/chai-enzyme-0.6.1.tgz#585c963c6ea1331446efd12ee8391e807d758620"
+chai-enzyme@^0.7.1:
+  version "0.7.1"
+  resolved "https://registry.yarnpkg.com/chai-enzyme/-/chai-enzyme-0.7.1.tgz#a945c81989bcc4fd96af6263f9c0a9c668f29b66"
   dependencies:
     html "^1.0.0"
     react-element-to-jsx-string "^5.0.0"
 
-chai@^3.5.0:
-  version "3.5.0"
-  resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247"
+chai@^4.0.1:
+  version "4.0.1"
+  resolved "https://registry.yarnpkg.com/chai/-/chai-4.0.1.tgz#9e41e808e17a7f10807721e2ac5a589d5bb09082"
   dependencies:
     assertion-error "^1.0.1"
-    deep-eql "^0.1.3"
-    type-detect "^1.0.0"
+    check-error "^1.0.1"
+    deep-eql "^2.0.1"
+    get-func-name "^2.0.0"
+    pathval "^1.0.0"
+    type-detect "^4.0.0"
 
 chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3:
   version "1.1.3"
@@ -1519,6 +1522,10 @@ chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3:
     strip-ansi "^3.0.0"
     supports-color "^2.0.0"
 
+check-error@^1.0.1:
+  version "1.0.2"
+  resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
+
 cheerio@^0.22.0:
   version "0.22.0"
   resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e"
@@ -2084,11 +2091,11 @@ decimal.js@7.1.1:
   version "7.1.1"
   resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-7.1.1.tgz#1adcad7d70d7a91c426d756f1eb6566c3be6cbcf"
 
-deep-eql@^0.1.3:
-  version "0.1.3"
-  resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2"
+deep-eql@^2.0.1:
+  version "2.0.2"
+  resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-2.0.2.tgz#b1bac06e56f0a76777686d50c9feb75c2ed7679a"
   dependencies:
-    type-detect "0.1.1"
+    type-detect "^3.0.0"
 
 deep-equal@^1.0.1:
   version "1.0.1"
@@ -2969,6 +2976,10 @@ get-caller-file@^1.0.1:
   version "1.0.2"
   resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5"
 
+get-func-name@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41"
+
 get-stdin@^4.0.1:
   version "4.0.1"
   resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
@@ -4640,6 +4651,10 @@ path-type@^1.0.0:
     pify "^2.0.0"
     pinkie-promise "^2.0.0"
 
+pathval@^1.0.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0"
+
 pbkdf2-compat@2.0.1:
   version "2.0.1"
   resolved "https://registry.yarnpkg.com/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz#b6e0c8fa99494d94e0511575802a59a5c142f288"
@@ -6102,9 +6117,9 @@ signal-exit@^3.0.0:
   version "3.0.2"
   resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
 
-sinon@^2.2.0:
-  version "2.3.1"
-  resolved "https://registry.yarnpkg.com/sinon/-/sinon-2.3.1.tgz#48c9c758b4d0bb86327486833f1c4298919ce9ee"
+sinon@^2.3.2:
+  version "2.3.2"
+  resolved "https://registry.yarnpkg.com/sinon/-/sinon-2.3.2.tgz#c43a9c570f32baac1159505cfeed19108855df89"
   dependencies:
     diff "^3.1.0"
     formatio "1.2.0"
@@ -6564,13 +6579,9 @@ type-check@~0.3.2:
   dependencies:
     prelude-ls "~1.1.2"
 
-type-detect@0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822"
-
-type-detect@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2"
+type-detect@^3.0.0:
+  version "3.0.0"
+  resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-3.0.0.tgz#46d0cc8553abb7b13a352b0d6dea2fd58f2d9b55"
 
 type-detect@^4.0.0:
   version "4.0.3"