summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2018-06-20 16:20:04 +0200
committerAndrej Mihajlov <and@mullvad.net>2018-06-20 16:20:04 +0200
commit648c6e06ce07503be4eebbd46bd7b2e843a862fe (patch)
treee8867916c95f8855dee60ad06f44e94244aa60f3
parent3e7a83f27a10cf6630ba5ff885b64cc24b02e9e3 (diff)
parentffd34043d74cd59206c260b59d318c8e9bba9a39 (diff)
downloadmullvadvpn-648c6e06ce07503be4eebbd46bd7b2e843a862fe.tar.xz
mullvadvpn-648c6e06ce07503be4eebbd46bd7b2e843a862fe.zip
Merge branch 'migrate-to-chai-spies'
-rw-r--r--.eslintrc17
-rw-r--r--app/components/Connect.js4
-rw-r--r--app/lib/keyframe-animation.js4
-rw-r--r--app/routes.js10
-rw-r--r--flow-libs/tests.js.flow5
-rw-r--r--package.json14
-rw-r--r--test/.eslintrc13
-rw-r--r--test/auth.spec.js49
-rw-r--r--test/autologin.spec.js15
-rw-r--r--test/components/Account.spec.js3
-rw-r--r--test/components/AccountInput.spec.js2
-rw-r--r--test/components/Connect.spec.js3
-rw-r--r--test/components/HeaderBar.spec.js1
-rw-r--r--test/components/Login.spec.js10
-rw-r--r--test/components/Preferences.spec.js3
-rw-r--r--test/components/SelectLocation.spec.js1
-rw-r--r--test/components/Settings.spec.js3
-rw-r--r--test/components/Support.spec.js12
-rw-r--r--test/components/Switch.spec.js1
-rw-r--r--test/connect.spec.js1
-rw-r--r--test/helpers/IpcChain.js25
-rw-r--r--test/ipc.spec.js6
-rw-r--r--test/keyframe-animation.spec.js39
-rw-r--r--test/login.spec.js19
-rw-r--r--test/logout.spec.js12
-rw-r--r--test/mocks/ipc.js8
-rw-r--r--test/relay-settings-builder.spec.js1
-rw-r--r--test/setup/renderer.js7
-rw-r--r--test/transition-rule.spec.js2
-rw-r--r--yarn.lock315
30 files changed, 286 insertions, 319 deletions
diff --git a/.eslintrc b/.eslintrc
index 07b7cb411d..5ed0f7b370 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -21,21 +21,26 @@
"func-names": "off",
"comma-dangle": "off",
"comma-spacing": "warn",
- "no-unused-expressions" : "off", // until fixed https://github.com/babel/babel-eslint/issues/158
+ "no-unused-expressions" : "error",
"no-unused-vars": ["error", {
"args": "all",
"argsIgnorePattern": "_.*",
"varsIgnorePattern": "_.*"
}],
- "block-scoped-var": "off", // until fixed https://github.com/eslint/eslint/issues/2253
+ "block-scoped-var": "error",
"react/prop-types": "off",
- "flowtype/define-flow-type": "warn",
- "react/no-render-return-value": "off" // see https://github.com/facebook/react/issues/10266
+ "flowtype/define-flow-type": "warn"
+ },
+ "settings": {
+ "react": {
+ "pragma": "React",
+ "version": "16.2",
+ "flowVersion": "0.66"
+ }
},
"env": {
"es6": true,
"node": true,
- "browser": true,
- "mocha": true
+ "browser": true
}
}
diff --git a/app/components/Connect.js b/app/components/Connect.js
index f4647678f1..fbb743854d 100644
--- a/app/components/Connect.js
+++ b/app/components/Connect.js
@@ -294,7 +294,9 @@ export default class Connect extends Component<ConnectProps, ConnectState> {
}
onIPAddressClick() {
- this._copyTimer && clearTimeout(this._copyTimer);
+ if (this._copyTimer) {
+ clearTimeout(this._copyTimer);
+ }
this._copyTimer = setTimeout(() => this.setState({ showCopyIPMessage: false }), 3000);
this.setState({ showCopyIPMessage: true });
this.props.onCopyIP();
diff --git a/app/lib/keyframe-animation.js b/app/lib/keyframe-animation.js
index 1b52f859c6..7a8968eb35 100644
--- a/app/lib/keyframe-animation.js
+++ b/app/lib/keyframe-animation.js
@@ -36,7 +36,7 @@ export default class KeyframeAnimation {
this._onFrame = newValue;
}
get onFrame(): ?OnFrameFn {
- this._onFrame;
+ return this._onFrame;
}
// called when animation finished for non-repeating animations.
@@ -44,7 +44,7 @@ export default class KeyframeAnimation {
this._onFinish = newValue;
}
get onFinish(): ?OnFinishFn {
- this._onFinish;
+ return this._onFinish;
}
// pace per frame in ms
diff --git a/app/routes.js b/app/routes.js
index 03f3401035..c48e03dac3 100644
--- a/app/routes.js
+++ b/app/routes.js
@@ -21,10 +21,6 @@ export type SharedRouteProps = {
backend: Backend,
};
-type CustomRouteProps = {
- component: React.ComponentType<*>,
-};
-
export default function makeRoutes(
getState: ReduxGetState,
componentProps: SharedRouteProps,
@@ -40,7 +36,7 @@ export default function makeRoutes(
// Renders public route
// example: <PublicRoute path="/" component={ MyComponent } />
- const PublicRoute = ({ component, ...otherProps }: CustomRouteProps) => {
+ const PublicRoute = ({ component, ...otherProps }) => {
return (
// $FlowFixMe: This has been fixed in Flow 0.71
<Route
@@ -54,7 +50,7 @@ export default function makeRoutes(
// Renders protected route that requires authentication, otherwise redirects to /
// example: <PrivateRoute path="/protected" component={ MyComponent } />
- const PrivateRoute = ({ component, ...otherProps }: CustomRouteProps) => {
+ const PrivateRoute = ({ component, ...otherProps }) => {
return (
// $FlowFixMe: This has been fixed in Flow 0.71
<Route
@@ -76,7 +72,7 @@ export default function makeRoutes(
// Renders login route that is only available to non-authenticated
// users. Otherwise this route redirects user to /connect.
// example: <LoginRoute path="/login" component={ MyComponent } />
- const LoginRoute = ({ component, ...otherProps }: CustomRouteProps) => {
+ const LoginRoute = ({ component, ...otherProps }) => {
return (
// $FlowFixMe: This has been fixed in Flow 0.71
<Route
diff --git a/flow-libs/tests.js.flow b/flow-libs/tests.js.flow
index b1daeefa4c..aecc8239fa 100644
--- a/flow-libs/tests.js.flow
+++ b/flow-libs/tests.js.flow
@@ -1,3 +1,5 @@
+import chai from 'chai';
+
// We use electron-mocha which has a child dependency on mocha.
// However flow-typed does not automatically pull annotations for mocha.
// These stubs remedy the absence of those.
@@ -5,3 +7,6 @@ declare function describe(string, Function): void;
declare function it(string, (done: Function) => any): Promise<any> | void;
declare function afterEach((done: Function) => void): Promise<any> | void;
declare function beforeEach((done: Function) => void): Promise<any> | void;
+
+declare var expect: $PropertyType<chai, 'expect'>;
+declare var spy: any; \ No newline at end of file
diff --git a/package.json b/package.json
index 5e79963fd0..3647796ead 100644
--- a/package.json
+++ b/package.json
@@ -39,7 +39,7 @@
"devDependencies": {
"babel-cli": "^6.22.2",
"babel-core": "^6.25.0",
- "babel-eslint": "^8.2.1",
+ "babel-eslint": "^8.2.3",
"babel-plugin-transform-builtin-extend": "^1.1.2",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
@@ -47,24 +47,24 @@
"babel-preset-react": "^6.22.0",
"browser-sync": "^2.23.6",
"chai": "^4.1.0",
+ "chai-spies": "^1.0.0",
"cross-env": "^5.1.3",
"electron": "^2.0.2",
"electron-builder": "^19.37.2",
"electron-devtools-installer": "^2.2.1",
- "electron-mocha": "^5.0.0",
+ "electron-mocha": "^6.0.4",
"enzyme": "^3.2.0",
"enzyme-adapter-react-16": "^1.1.0",
- "eslint": "^4.18.2",
+ "eslint": "^4.19.1",
"eslint-config-prettier": "^2.9.0",
- "eslint-plugin-flowtype": "^2.46.1",
- "eslint-plugin-react": "^7.7.0",
+ "eslint-plugin-flowtype": "^2.49.3",
+ "eslint-plugin-react": "^7.9.1",
"flow-bin": "^0.66.0",
"flow-typed": "^2.4.0",
"npm-run-all": "^4.0.1",
"prettier": "1.13.3",
"redux-mock-store": "^1.3.0",
- "rimraf": "^2.5.4",
- "sinon": "^6.0.0"
+ "rimraf": "^2.5.4"
},
"scripts": {
"android": "react-native run-android",
diff --git a/test/.eslintrc b/test/.eslintrc
new file mode 100644
index 0000000000..00c8d44bb9
--- /dev/null
+++ b/test/.eslintrc
@@ -0,0 +1,13 @@
+{
+ "rules": {
+ "no-unused-expressions" : "off",
+ "react/no-render-return-value": "off"
+ },
+ "env": {
+ "mocha": true
+ },
+ "globals": {
+ "expect": true,
+ "spy": true
+ }
+} \ No newline at end of file
diff --git a/test/auth.spec.js b/test/auth.spec.js
index effc3473cb..e6b2c25486 100644
--- a/test/auth.spec.js
+++ b/test/auth.spec.js
@@ -1,56 +1,37 @@
// @flow
-import { expect } from 'chai';
-import {
- setupIpcAndStore,
- setupBackendAndStore,
- failFast,
- checkNextTick,
-} from './helpers/ipc-helpers';
+import { setupIpcAndStore, setupBackendAndStore } from './helpers/ipc-helpers';
import { IpcChain } from './helpers/IpcChain';
import { Backend } from '../app/lib/backend';
describe('authentication', () => {
it('authenticates before ipc call if unauthenticated', (done) => {
const { store, mockIpc } = setupIpcAndStore();
- const credentials = {
- sharedSecret: 'foo',
- connectionString: '',
- };
const chain = new IpcChain(mockIpc);
- chain
- .require('authenticate')
- .withInputValidation((secret) => {
- expect(secret).to.equal(credentials.sharedSecret);
- })
- .done();
-
- chain.require('connect').done();
-
chain.onSuccessOrFailure(done);
+ chain.expect('authenticate').withInputValidation((secret) => {
+ expect(secret).to.equal(credentials.sharedSecret);
+ });
+ chain.expect('connect');
+ const credentials = {
+ sharedSecret: '',
+ connectionString: '',
+ };
const backend = new Backend(store, credentials, mockIpc);
backend.connect();
});
- it('reauthenticates on reconnect', (done) => {
+ it('reauthenticates on reconnect', async () => {
const { mockIpc, backend } = setupBackendAndStore();
- let authCount = 0;
- mockIpc.authenticate = () => {
- authCount++;
- return Promise.resolve();
- };
-
+ mockIpc.authenticate = spy(mockIpc.authenticate);
mockIpc.killWebSocket();
- failFast(() => {
- expect(authCount).to.equal(0);
- }, done);
- backend.connect();
- checkNextTick(() => {
- expect(authCount).to.equal(1);
- }, done);
+ expect(mockIpc.authenticate).to.not.have.been.called();
+
+ await backend.connect();
+ expect(mockIpc.authenticate).to.have.been.called.once;
});
});
diff --git a/test/autologin.spec.js b/test/autologin.spec.js
index debacc6c60..60c5cc5bde 100644
--- a/test/autologin.spec.js
+++ b/test/autologin.spec.js
@@ -1,6 +1,5 @@
// @flow
-import { expect } from 'chai';
import { setupBackendAndStore, setupBackendAndMockStore, getLocation } from './helpers/ipc-helpers';
import { IpcChain } from './helpers/IpcChain';
@@ -11,17 +10,11 @@ describe('autologin', () => {
const randomAccountToken = '12345';
const chain = new IpcChain(mockIpc);
- chain
- .require('getAccount')
- .withReturnValue(randomAccountToken)
- .done();
+ chain.expect('getAccount').withReturnValue(randomAccountToken);
- chain
- .require('getAccountData')
- .withInputValidation((num) => {
- expect(num).to.equal(randomAccountToken);
- })
- .done();
+ chain.expect('getAccountData').withInputValidation((num) => {
+ expect(num).to.equal(randomAccountToken);
+ });
chain.onSuccessOrFailure(done);
diff --git a/test/components/Account.spec.js b/test/components/Account.spec.js
index 2476cc35e0..2c0979bb50 100644
--- a/test/components/Account.spec.js
+++ b/test/components/Account.spec.js
@@ -1,7 +1,6 @@
// @flow
-import { expect } from 'chai';
-import React from 'react';
+import * as React from 'react';
import { shallow } from 'enzyme';
import Account from '../../app/components/Account';
import type { AccountProps } from '../../app/components/Account';
diff --git a/test/components/AccountInput.spec.js b/test/components/AccountInput.spec.js
index eface9c8c6..2f6ead1b45 100644
--- a/test/components/AccountInput.spec.js
+++ b/test/components/AccountInput.spec.js
@@ -1,5 +1,5 @@
// @flow
-import { expect } from 'chai';
+
import { createKeyEvent } from '../helpers/dom-events';
import * as React from 'react';
import { shallow } from 'enzyme';
diff --git a/test/components/Connect.spec.js b/test/components/Connect.spec.js
index 64771248b6..d21a8eb510 100644
--- a/test/components/Connect.spec.js
+++ b/test/components/Connect.spec.js
@@ -1,7 +1,6 @@
// @flow
-import { expect } from 'chai';
-import React from 'react';
+import * as React from 'react';
import { shallow } from 'enzyme';
import Connect from '../../app/components/Connect';
diff --git a/test/components/HeaderBar.spec.js b/test/components/HeaderBar.spec.js
index b5fb6bb7b6..6fcbfb54d7 100644
--- a/test/components/HeaderBar.spec.js
+++ b/test/components/HeaderBar.spec.js
@@ -1,6 +1,5 @@
// @flow
-import { expect } from 'chai';
import React from 'react';
import { shallow } from 'enzyme';
import HeaderBar from '../../app/components/HeaderBar';
diff --git a/test/components/Login.spec.js b/test/components/Login.spec.js
index 1c75904717..90bb70f4b3 100644
--- a/test/components/Login.spec.js
+++ b/test/components/Login.spec.js
@@ -1,16 +1,14 @@
// @flow
-import { expect } from 'chai';
import * as React from 'react';
import { shallow } from 'enzyme';
-import sinon from 'sinon';
import Login from '../../app/components/Login';
import AccountInput from '../../app/components/AccountInput';
describe('components/Login', () => {
it('notifies on the first change after failure', () => {
- let onFirstChange = sinon.spy();
+ let onFirstChange = spy();
const props = {
account: Object.assign({}, defaultAccount, {
status: 'failed',
@@ -22,12 +20,10 @@ describe('components/Login', () => {
const accountInput = component.find(AccountInput);
accountInput.simulate('change', 'foo');
- expect(onFirstChange.calledOnce).to.be.true;
-
- onFirstChange.resetHistory();
+ expect(onFirstChange).to.have.been.called.once;
accountInput.simulate('change', 'bar');
- expect(onFirstChange.calledOnce).to.be.false;
+ expect(onFirstChange).to.have.been.called.once;
});
it('does not show the footer when logging in', () => {
diff --git a/test/components/Preferences.spec.js b/test/components/Preferences.spec.js
index 3b6976a1ec..280b24ccd7 100644
--- a/test/components/Preferences.spec.js
+++ b/test/components/Preferences.spec.js
@@ -1,7 +1,6 @@
// @flow
-import { expect } from 'chai';
-import React from 'react';
+import * as React from 'react';
import { shallow } from 'enzyme';
import Preferences from '../../app/components/Preferences';
diff --git a/test/components/SelectLocation.spec.js b/test/components/SelectLocation.spec.js
index 8310d52b97..c9a1f08864 100644
--- a/test/components/SelectLocation.spec.js
+++ b/test/components/SelectLocation.spec.js
@@ -1,6 +1,5 @@
// @flow
-import { expect } from 'chai';
import * as React from 'react';
import { shallow } from 'enzyme';
import SelectLocation from '../../app/components/SelectLocation';
diff --git a/test/components/Settings.spec.js b/test/components/Settings.spec.js
index 61ca47e3e4..f564902c2a 100644
--- a/test/components/Settings.spec.js
+++ b/test/components/Settings.spec.js
@@ -1,7 +1,6 @@
// @flow
-import { expect } from 'chai';
-import React from 'react';
+import * as React from 'react';
import Settings from '../../app/components/Settings';
import { shallow } from 'enzyme';
diff --git a/test/components/Support.spec.js b/test/components/Support.spec.js
index 653c376713..ce1efb2b75 100644
--- a/test/components/Support.spec.js
+++ b/test/components/Support.spec.js
@@ -1,10 +1,8 @@
// @flow
-import { expect } from 'chai';
-import React from 'react';
+import * as React from 'react';
import Support from '../../app/components/Support';
import { shallow } from 'enzyme';
-import sinon from 'sinon';
import type { SupportProps } from '../../app/components/Support';
describe('components/Support', () => {
@@ -63,7 +61,7 @@ describe('components/Support', () => {
});
it('should not collect report twice', (done) => {
- const collectCallback = sinon.spy(() => Promise.resolve('non-falsy'));
+ const collectCallback = spy(() => Promise.resolve('non-falsy'));
const props = makeProps({
onCollectLog: collectCallback,
});
@@ -77,7 +75,7 @@ describe('components/Support', () => {
setTimeout(() => {
try {
- expect(collectCallback.callCount).to.equal(1);
+ expect(collectCallback).to.have.been.called.once;
done();
} catch (e) {
done(e);
@@ -86,12 +84,12 @@ describe('components/Support', () => {
});
it('should collect report on submission', (done) => {
- const collectCallback = sinon.spy(() => Promise.resolve(''));
+ const collectCallback = spy(() => Promise.resolve(''));
const props = makeProps({
onCollectLog: collectCallback,
onSend: (_report) => {
try {
- expect(collectCallback.calledOnce).to.be.true;
+ expect(collectCallback).to.have.been.called.once;
done();
} catch (e) {
done(e);
diff --git a/test/components/Switch.spec.js b/test/components/Switch.spec.js
index e1242d74df..44794d9bba 100644
--- a/test/components/Switch.spec.js
+++ b/test/components/Switch.spec.js
@@ -1,6 +1,5 @@
// @flow
-import { expect } from 'chai';
import * as React from 'react';
import ReactDOM from 'react-dom';
import ReactTestUtils, { Simulate } from 'react-dom/test-utils';
diff --git a/test/connect.spec.js b/test/connect.spec.js
index 0b5b33be53..f1621dbeb6 100644
--- a/test/connect.spec.js
+++ b/test/connect.spec.js
@@ -1,6 +1,5 @@
// @flow
-import { expect } from 'chai';
import connectionActions from '../app/redux/connection/actions';
import { setupBackendAndStore, checkNextTick } from './helpers/ipc-helpers';
diff --git a/test/helpers/IpcChain.js b/test/helpers/IpcChain.js
index 44a1c7b0d7..1505621cc0 100644
--- a/test/helpers/IpcChain.js
+++ b/test/helpers/IpcChain.js
@@ -1,6 +1,5 @@
// @flow
-import { expect } from 'chai';
import { check, failFast } from './ipc-helpers';
export class IpcChain {
@@ -17,15 +16,17 @@ export class IpcChain {
this._aborted = false;
}
- require<R>(ipcCall: string): StepBuilder<R> {
+ expect<R>(ipcCall: string): StepBuilder<R> {
+ const builder = new StepBuilder(ipcCall);
this._expectedCalls.push(ipcCall);
- return new StepBuilder(ipcCall, this._addStep.bind(this));
+ this._addStep(builder);
+
+ return builder;
}
_addStep<R>(step: StepBuilder<R>) {
- const me = this;
- this._mockIpc[step.ipcCall] = function() {
- return new Promise((r) => me._stepPromiseCallback(step, r, arguments));
+ this._mockIpc[step.ipcCall] = (...args: Array<mixed>) => {
+ return new Promise((r) => this._stepPromiseCallback(step, r, args));
};
}
@@ -80,16 +81,14 @@ export class IpcChain {
class StepBuilder<R> {
ipcCall: string;
- inputValidation: ?() => void;
+ inputValidation: ?(...args: Array<mixed>) => void;
returnValue: ?R;
- _cb: (StepBuilder<R>) => void;
- constructor(ipcCall: string, cb: (StepBuilder<R>) => void) {
+ constructor(ipcCall: string) {
this.ipcCall = ipcCall;
- this._cb = cb;
}
- withInputValidation(iv: () => void): this {
+ withInputValidation(iv: (...args: Array<mixed>) => void): this {
this.inputValidation = iv;
return this;
}
@@ -98,8 +97,4 @@ class StepBuilder<R> {
this.returnValue = rv;
return this;
}
-
- done() {
- this._cb(this);
- }
}
diff --git a/test/ipc.spec.js b/test/ipc.spec.js
index 43d6e9e2f4..1c8b19b5a6 100644
--- a/test/ipc.spec.js
+++ b/test/ipc.spec.js
@@ -2,8 +2,6 @@
import Ipc from '../app/lib/jsonrpc-ws-ipc';
import jsonrpc from 'jsonrpc-lite';
-import { expect } from 'chai';
-import assert from 'assert';
import type { JsonRpcMessage } from '../app/lib/jsonrpc-ws-ipc';
describe('The IPC server', () => {
@@ -45,7 +43,9 @@ describe('The IPC server', () => {
const decoy = ipc
.send('a decoy', [], 1)
- .then(() => assert(false, 'Should not be called'))
+ .then(() => {
+ throw new Error('Should not be called');
+ })
.catch((e) => {
if (e.name !== 'TimeOutError') {
throw e;
diff --git a/test/keyframe-animation.spec.js b/test/keyframe-animation.spec.js
index 5153719497..926bb79625 100644
--- a/test/keyframe-animation.spec.js
+++ b/test/keyframe-animation.spec.js
@@ -1,4 +1,5 @@
-import { expect } from 'chai';
+// @flow
+
import KeyframeAnimation from '../app/lib/keyframe-animation';
import { nativeImage } from 'electron';
@@ -15,7 +16,9 @@ describe('lib/keyframe-animation', function() {
it('should play sequence', (done) => {
let seq = [];
const animation = newAnimation();
- animation.onFrame = () => seq.push(animation._currentFrame);
+ animation.onFrame = () => {
+ seq.push(animation._currentFrame);
+ };
animation.onFinish = () => {
expect(seq).to.be.deep.equal([0, 1, 2, 3, 4]);
expect(animation._currentFrame).to.be.equal(4);
@@ -28,7 +31,9 @@ describe('lib/keyframe-animation', function() {
it('should play one frame', (done) => {
let seq = [];
const animation = newAnimation();
- animation.onFrame = () => seq.push(animation._currentFrame);
+ animation.onFrame = () => {
+ seq.push(animation._currentFrame);
+ };
animation.onFinish = () => {
expect(seq).to.be.deep.equal([3]);
expect(animation._currentFrame).to.be.equal(3);
@@ -41,7 +46,9 @@ describe('lib/keyframe-animation', function() {
it('should play sequence with custom frames', (done) => {
let seq = [];
const animation = newAnimation();
- animation.onFrame = () => seq.push(animation._currentFrame);
+ animation.onFrame = () => {
+ seq.push(animation._currentFrame);
+ };
animation.onFinish = () => {
expect(seq).to.be.deep.equal([2, 3, 4]);
expect(animation._currentFrame).to.be.equal(4);
@@ -57,7 +64,9 @@ describe('lib/keyframe-animation', function() {
it('should play sequence with custom frames in reverse', (done) => {
let seq = [];
const animation = newAnimation();
- animation.onFrame = () => seq.push(animation._currentFrame);
+ animation.onFrame = () => {
+ seq.push(animation._currentFrame);
+ };
animation.onFinish = () => {
expect(seq).to.be.deep.equal([4, 3, 2]);
expect(animation._currentFrame).to.be.equal(2);
@@ -74,7 +83,9 @@ describe('lib/keyframe-animation', function() {
it('should begin from current state starting below range', (done) => {
let seq = [];
const animation = newAnimation();
- animation.onFrame = () => seq.push(animation._currentFrame);
+ animation.onFrame = () => {
+ seq.push(animation._currentFrame);
+ };
animation.onFinish = () => {
expect(seq).to.be.deep.equal([0, 1, 2, 3, 4]);
expect(animation._currentFrame).to.be.equal(4);
@@ -94,7 +105,9 @@ describe('lib/keyframe-animation', function() {
it('should begin from current state starting below range reverse', (done) => {
let seq = [];
const animation = newAnimation();
- animation.onFrame = () => seq.push(animation._currentFrame);
+ animation.onFrame = () => {
+ seq.push(animation._currentFrame);
+ };
animation.onFinish = () => {
expect(seq).to.be.deep.equal([0, 1, 2, 3]);
expect(animation._currentFrame).to.be.equal(3);
@@ -115,7 +128,9 @@ describe('lib/keyframe-animation', function() {
it('should begin from current state starting above range', (done) => {
let seq = [];
const animation = newAnimation();
- animation.onFrame = () => seq.push(animation._currentFrame);
+ animation.onFrame = () => {
+ seq.push(animation._currentFrame);
+ };
animation.onFinish = () => {
expect(seq).to.be.deep.equal([4, 3, 2]);
expect(animation._currentFrame).to.be.equal(2);
@@ -135,7 +150,9 @@ describe('lib/keyframe-animation', function() {
it('should begin from current state starting above range reverse', (done) => {
let seq = [];
const animation = newAnimation();
- animation.onFrame = () => seq.push(animation._currentFrame);
+ animation.onFrame = () => {
+ seq.push(animation._currentFrame);
+ };
animation.onFinish = () => {
expect(seq).to.be.deep.equal([4, 3, 2, 1]);
expect(animation._currentFrame).to.be.equal(1);
@@ -156,7 +173,9 @@ describe('lib/keyframe-animation', function() {
it('should play sequence in reverse', (done) => {
let seq = [];
const animation = newAnimation();
- animation.onFrame = () => seq.push(animation._currentFrame);
+ animation.onFrame = () => {
+ seq.push(animation._currentFrame);
+ };
animation.onFinish = () => {
expect(seq).to.be.deep.equal([4, 3, 2, 1, 0]);
expect(animation._currentFrame).to.be.equal(0);
diff --git a/test/login.spec.js b/test/login.spec.js
index acb38db2eb..68db14494b 100644
--- a/test/login.spec.js
+++ b/test/login.spec.js
@@ -1,6 +1,5 @@
// @flow
-import { expect } from 'chai';
import {
setupBackendAndStore,
setupBackendAndMockStore,
@@ -17,19 +16,13 @@ describe('Logging in', () => {
const { store, mockIpc, backend } = setupBackendAndStore();
const chain = new IpcChain(mockIpc);
- chain
- .require('getAccountData')
- .withInputValidation((an) => {
- expect(an).to.equal('123');
- })
- .done();
+ chain.expect('getAccountData').withInputValidation((an) => {
+ expect(an).to.equal('123');
+ });
- chain
- .require('setAccount')
- .withInputValidation((an) => {
- expect(an).to.equal('123');
- })
- .done();
+ chain.expect('setAccount').withInputValidation((an) => {
+ expect(an).to.equal('123');
+ });
chain.onSuccessOrFailure(done);
diff --git a/test/logout.spec.js b/test/logout.spec.js
index c7ed45adb2..65bc3aba09 100644
--- a/test/logout.spec.js
+++ b/test/logout.spec.js
@@ -1,6 +1,5 @@
// @flow
-import { expect } from 'chai';
import {
setupBackendAndStore,
setupBackendAndMockStore,
@@ -16,13 +15,10 @@ describe('logging out', () => {
const { mockIpc, backend } = setupBackendAndStore();
const chain = new IpcChain(mockIpc);
- chain
- .require('setAccount')
- .withInputValidation((num) => {
- expect(num).to.be.null;
- })
- .done();
- chain.require('disconnect').done();
+ chain.expect('setAccount').withInputValidation((num) => {
+ expect(num).to.be.null;
+ });
+ chain.expect('disconnect');
chain.onSuccessOrFailure(done);
backend.logout();
diff --git a/test/mocks/ipc.js b/test/mocks/ipc.js
index cd8dc9fbac..590313ec13 100644
--- a/test/mocks/ipc.js
+++ b/test/mocks/ipc.js
@@ -78,8 +78,8 @@ export function newMockIpc() {
},
sendNewState: (state: BackendState) => {
- for (const l of stateListeners) {
- l(state);
+ for (const listener of stateListeners) {
+ listener(state);
}
},
@@ -94,8 +94,8 @@ export function newMockIpc() {
removeAccountFromHistory: (_accountToken) => Promise.resolve(),
killWebSocket: () => {
- for (const l of connectionCloseListeners) {
- l();
+ for (const listener of connectionCloseListeners) {
+ listener();
}
},
};
diff --git a/test/relay-settings-builder.spec.js b/test/relay-settings-builder.spec.js
index a2d69ceca6..ace01a978c 100644
--- a/test/relay-settings-builder.spec.js
+++ b/test/relay-settings-builder.spec.js
@@ -1,6 +1,5 @@
// @flow
-import { expect } from 'chai';
import RelaySettingsBuilder from '../app/lib/relay-settings-builder';
describe('Relay settings builder', () => {
diff --git a/test/setup/renderer.js b/test/setup/renderer.js
index f27568f58d..acfa87b7ed 100644
--- a/test/setup/renderer.js
+++ b/test/setup/renderer.js
@@ -1,6 +1,13 @@
const Enzyme = require('enzyme');
const Adapter = require('enzyme-adapter-react-16');
+const chai = require('chai');
+const spies = require('chai-spies');
+
+chai.use(spies);
Enzyme.configure({
adapter: new Adapter(),
});
+
+global.expect = chai.expect;
+global.spy = chai.spy;
diff --git a/test/transition-rule.spec.js b/test/transition-rule.spec.js
index 00fffff01e..f36c44182e 100644
--- a/test/transition-rule.spec.js
+++ b/test/transition-rule.spec.js
@@ -1,5 +1,5 @@
// @flow
-import { expect } from 'chai';
+
import TransitionRule from '../app/lib/transition-rule';
describe('TransitionRule', () => {
diff --git a/yarn.lock b/yarn.lock
index 2aa05436c0..08c4d88a2b 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -26,81 +26,82 @@
version "0.0.6"
resolved "https://registry.yarnpkg.com/7zip/-/7zip-0.0.6.tgz#9cafb171af82329490353b4816f03347aa150a30"
-"@babel/code-frame@7.0.0-beta.40", "@babel/code-frame@^7.0.0-beta.40":
- version "7.0.0-beta.40"
- resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.40.tgz#37e2b0cf7c56026b4b21d3927cadf81adec32ac6"
+"@babel/code-frame@7.0.0-beta.44":
+ version "7.0.0-beta.44"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.44.tgz#2a02643368de80916162be70865c97774f3adbd9"
dependencies:
- "@babel/highlight" "7.0.0-beta.40"
+ "@babel/highlight" "7.0.0-beta.44"
-"@babel/generator@7.0.0-beta.40":
- version "7.0.0-beta.40"
- resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-beta.40.tgz#ab61f9556f4f71dbd1138949c795bb9a21e302ea"
+"@babel/generator@7.0.0-beta.44":
+ version "7.0.0-beta.44"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-beta.44.tgz#c7e67b9b5284afcf69b309b50d7d37f3e5033d42"
dependencies:
- "@babel/types" "7.0.0-beta.40"
+ "@babel/types" "7.0.0-beta.44"
jsesc "^2.5.1"
lodash "^4.2.0"
source-map "^0.5.0"
trim-right "^1.0.1"
-"@babel/helper-function-name@7.0.0-beta.40":
- version "7.0.0-beta.40"
- resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.40.tgz#9d033341ab16517f40d43a73f2d81fc431ccd7b6"
+"@babel/helper-function-name@7.0.0-beta.44":
+ version "7.0.0-beta.44"
+ resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.44.tgz#e18552aaae2231100a6e485e03854bc3532d44dd"
dependencies:
- "@babel/helper-get-function-arity" "7.0.0-beta.40"
- "@babel/template" "7.0.0-beta.40"
- "@babel/types" "7.0.0-beta.40"
+ "@babel/helper-get-function-arity" "7.0.0-beta.44"
+ "@babel/template" "7.0.0-beta.44"
+ "@babel/types" "7.0.0-beta.44"
-"@babel/helper-get-function-arity@7.0.0-beta.40":
- version "7.0.0-beta.40"
- resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.40.tgz#ac0419cf067b0ec16453e1274f03878195791c6e"
+"@babel/helper-get-function-arity@7.0.0-beta.44":
+ version "7.0.0-beta.44"
+ resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.44.tgz#d03ca6dd2b9f7b0b1e6b32c56c72836140db3a15"
dependencies:
- "@babel/types" "7.0.0-beta.40"
+ "@babel/types" "7.0.0-beta.44"
-"@babel/highlight@7.0.0-beta.40":
- version "7.0.0-beta.40"
- resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.40.tgz#b43d67d76bf46e1d10d227f68cddcd263786b255"
+"@babel/helper-split-export-declaration@7.0.0-beta.44":
+ version "7.0.0-beta.44"
+ resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.44.tgz#c0b351735e0fbcb3822c8ad8db4e583b05ebd9dc"
+ dependencies:
+ "@babel/types" "7.0.0-beta.44"
+
+"@babel/highlight@7.0.0-beta.44":
+ version "7.0.0-beta.44"
+ resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.44.tgz#18c94ce543916a80553edcdcf681890b200747d5"
dependencies:
chalk "^2.0.0"
esutils "^2.0.2"
js-tokens "^3.0.0"
-"@babel/template@7.0.0-beta.40":
- version "7.0.0-beta.40"
- resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.40.tgz#034988c6424eb5c3268fe6a608626de1f4410fc8"
+"@babel/template@7.0.0-beta.44":
+ version "7.0.0-beta.44"
+ resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.44.tgz#f8832f4fdcee5d59bf515e595fc5106c529b394f"
dependencies:
- "@babel/code-frame" "7.0.0-beta.40"
- "@babel/types" "7.0.0-beta.40"
- babylon "7.0.0-beta.40"
+ "@babel/code-frame" "7.0.0-beta.44"
+ "@babel/types" "7.0.0-beta.44"
+ babylon "7.0.0-beta.44"
lodash "^4.2.0"
-"@babel/traverse@^7.0.0-beta.40":
- version "7.0.0-beta.40"
- resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.40.tgz#d140e449b2e093ef9fe1a2eecc28421ffb4e521e"
+"@babel/traverse@7.0.0-beta.44":
+ version "7.0.0-beta.44"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.44.tgz#a970a2c45477ad18017e2e465a0606feee0d2966"
dependencies:
- "@babel/code-frame" "7.0.0-beta.40"
- "@babel/generator" "7.0.0-beta.40"
- "@babel/helper-function-name" "7.0.0-beta.40"
- "@babel/types" "7.0.0-beta.40"
- babylon "7.0.0-beta.40"
- debug "^3.0.1"
+ "@babel/code-frame" "7.0.0-beta.44"
+ "@babel/generator" "7.0.0-beta.44"
+ "@babel/helper-function-name" "7.0.0-beta.44"
+ "@babel/helper-split-export-declaration" "7.0.0-beta.44"
+ "@babel/types" "7.0.0-beta.44"
+ babylon "7.0.0-beta.44"
+ debug "^3.1.0"
globals "^11.1.0"
invariant "^2.2.0"
lodash "^4.2.0"
-"@babel/types@7.0.0-beta.40", "@babel/types@^7.0.0-beta.40":
- version "7.0.0-beta.40"
- resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.40.tgz#25c3d7aae14126abe05fcb098c65a66b6d6b8c14"
+"@babel/types@7.0.0-beta.44":
+ version "7.0.0-beta.44"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.44.tgz#6b1b164591f77dec0a0342aca995f2d046b3a757"
dependencies:
esutils "^2.0.2"
lodash "^4.2.0"
to-fast-properties "^2.0.0"
-"@sinonjs/formatio@^2.0.0":
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/@sinonjs/formatio/-/formatio-2.0.0.tgz#84db7e9eb5531df18a8c5e0bfb6e449e55e654b2"
- dependencies:
- samsam "1.3.0"
-
"@types/lodash@^4.14.64":
version "4.14.91"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.91.tgz#794611b28056d16b5436059c6d800b39d573cd3a"
@@ -173,9 +174,9 @@ acorn@^3.0.4:
version "3.3.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a"
-acorn@^5.2.1:
- version "5.2.1"
- resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.2.1.tgz#317ac7821826c22c702d66189ab8359675f135d7"
+acorn@^5.5.0:
+ version "5.7.1"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8"
after@0.8.2:
version "0.8.2"
@@ -516,14 +517,14 @@ babel-core@^6.25.0, babel-core@^6.26.0:
slash "^1.0.0"
source-map "^0.5.7"
-babel-eslint@^8.2.1:
- version "8.2.2"
- resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.2.2.tgz#1102273354c6f0b29b4ea28a65f97d122296b68b"
+babel-eslint@^8.2.3:
+ version "8.2.3"
+ resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.2.3.tgz#1a2e6681cc9bc4473c32899e59915e19cd6733cf"
dependencies:
- "@babel/code-frame" "^7.0.0-beta.40"
- "@babel/traverse" "^7.0.0-beta.40"
- "@babel/types" "^7.0.0-beta.40"
- babylon "^7.0.0-beta.40"
+ "@babel/code-frame" "7.0.0-beta.44"
+ "@babel/traverse" "7.0.0-beta.44"
+ "@babel/types" "7.0.0-beta.44"
+ babylon "7.0.0-beta.44"
eslint-scope "~3.7.1"
eslint-visitor-keys "^1.0.0"
@@ -1190,9 +1191,9 @@ babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0:
lodash "^4.17.4"
to-fast-properties "^1.0.3"
-babylon@7.0.0-beta.40, babylon@^7.0.0-beta.40:
- version "7.0.0-beta.40"
- resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.40.tgz#91fc8cd56d5eb98b28e6fde41045f2957779940a"
+babylon@7.0.0-beta.44:
+ version "7.0.0-beta.44"
+ resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.44.tgz#89159e15e6e30c5096e22d738d8c0af8a0e8ca1d"
babylon@^6.18.0:
version "6.18.0"
@@ -1391,9 +1392,9 @@ braces@^1.8.2:
preserve "^0.2.0"
repeat-element "^1.1.2"
-browser-stdout@1.3.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f"
+browser-stdout@1.3.1:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60"
browser-sync-ui@v1.0.1:
version "1.0.1"
@@ -1579,6 +1580,10 @@ caw@^1.0.1:
object-assign "^3.0.0"
tunnel-agent "^0.4.0"
+chai-spies@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/chai-spies/-/chai-spies-1.0.0.tgz#d16b39336fb316d03abf8c375feb23c0c8bb163d"
+
chai@^4.1.0:
version "4.1.2"
resolved "https://registry.yarnpkg.com/chai/-/chai-4.1.2.tgz#0f64584ba642f0f2ace2806279f4f06ca23ad73c"
@@ -1802,9 +1807,9 @@ commander@2:
version "2.14.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa"
-commander@2.11.0:
- version "2.11.0"
- resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563"
+commander@2.15.1, commander@^2.15.1:
+ version "2.15.1"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f"
commander@^2.11.0:
version "2.12.2"
@@ -2217,7 +2222,7 @@ debug@2.6.9, debug@^2.0.0, debug@^2.1.0, debug@^2.1.2, debug@^2.1.3, debug@^2.2.
dependencies:
ms "2.0.0"
-debug@3.1.0, debug@^3.0.0, debug@^3.0.1, debug@^3.1.0:
+debug@3.1.0, debug@^3.0.0, debug@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
dependencies:
@@ -2389,18 +2394,14 @@ dev-ip@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/dev-ip/-/dev-ip-1.0.1.tgz#a76a3ed1855be7a012bb8ac16cb80f3c00dc28f0"
-diff@3.3.1:
- version "3.3.1"
- resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75"
+diff@3.5.0:
+ version "3.5.0"
+ resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"
diff@^2.1.2:
version "2.2.3"
resolved "https://registry.yarnpkg.com/diff/-/diff-2.2.3.tgz#60eafd0d28ee906e4e8ff0a52c1229521033bf99"
-diff@^3.5.0:
- version "3.5.0"
- resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"
-
discontinuous-range@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/discontinuous-range/-/discontinuous-range-1.0.0.tgz#e38331f0844bba49b9a9cb71c771585aab1bc65a"
@@ -2416,7 +2417,7 @@ dmg-builder@3.1.3:
js-yaml "^3.10.0"
parse-color "^1.0.0"
-doctrine@^2.0.2, doctrine@^2.1.0:
+doctrine@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d"
dependencies:
@@ -2658,15 +2659,15 @@ electron-log@^2.2.8:
version "2.2.14"
resolved "https://registry.yarnpkg.com/electron-log/-/electron-log-2.2.14.tgz#2123319ccb8d70b0db07f0eda57d5823cb42b4b0"
-electron-mocha@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/electron-mocha/-/electron-mocha-5.0.0.tgz#415b86166a6bf80125fc4106ecc2545669c284ac"
+electron-mocha@^6.0.4:
+ version "6.0.4"
+ resolved "https://registry.yarnpkg.com/electron-mocha/-/electron-mocha-6.0.4.tgz#5130ff3ed1ffc2971de26881cd7d18c0c0179baf"
dependencies:
- commander "^2.11.0"
+ commander "^2.15.1"
electron-window "^0.8.0"
- fs-extra "^4.0.2"
- mocha "^4.0.1"
- which "^1.3.0"
+ fs-extra "^6.0.1"
+ mocha "^5.2.0"
+ which "^1.3.1"
electron-osx-sign@0.4.8:
version "0.4.8"
@@ -2894,20 +2895,20 @@ eslint-config-prettier@^2.9.0:
dependencies:
get-stdin "^5.0.1"
-eslint-plugin-flowtype@^2.46.1:
- version "2.46.1"
- resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.46.1.tgz#c4f81d580cd89c82bc3a85a1ccf4ae3a915143a4"
+eslint-plugin-flowtype@^2.49.3:
+ version "2.49.3"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.49.3.tgz#ccca6ee5ba2027eb3ed36bc2ec8c9a842feee841"
dependencies:
- lodash "^4.15.0"
+ lodash "^4.17.10"
-eslint-plugin-react@^7.7.0:
- version "7.7.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.7.0.tgz#f606c719dbd8a1a2b3d25c16299813878cca0160"
+eslint-plugin-react@^7.9.1:
+ version "7.9.1"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.9.1.tgz#101aadd15e7c7b431ed025303ac7b421a8e3dc15"
dependencies:
- doctrine "^2.0.2"
- has "^1.0.1"
+ doctrine "^2.1.0"
+ has "^1.0.2"
jsx-ast-utils "^2.0.1"
- prop-types "^15.6.0"
+ prop-types "^15.6.1"
eslint-scope@^3.7.1, eslint-scope@~3.7.1:
version "3.7.1"
@@ -2920,9 +2921,9 @@ eslint-visitor-keys@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d"
-eslint@^4.18.2:
- version "4.18.2"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.18.2.tgz#0f81267ad1012e7d2051e186a9004cc2267b8d45"
+eslint@^4.19.1:
+ version "4.19.1"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300"
dependencies:
ajv "^5.3.0"
babel-code-frame "^6.22.0"
@@ -2933,7 +2934,7 @@ eslint@^4.18.2:
doctrine "^2.1.0"
eslint-scope "^3.7.1"
eslint-visitor-keys "^1.0.0"
- espree "^3.5.2"
+ espree "^3.5.4"
esquery "^1.0.0"
esutils "^2.0.2"
file-entry-cache "^2.0.0"
@@ -2955,6 +2956,7 @@ eslint@^4.18.2:
path-is-inside "^1.0.2"
pluralize "^7.0.0"
progress "^2.0.0"
+ regexpp "^1.0.1"
require-uncached "^1.0.3"
semver "^5.3.0"
strip-ansi "^4.0.0"
@@ -2962,11 +2964,11 @@ eslint@^4.18.2:
table "4.0.2"
text-table "~0.2.0"
-espree@^3.5.2:
- version "3.5.2"
- resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.2.tgz#756ada8b979e9dcfcdb30aad8d1a9304a905e1ca"
+espree@^3.5.4:
+ version "3.5.4"
+ resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7"
dependencies:
- acorn "^5.2.1"
+ acorn "^5.5.0"
acorn-jsx "^3.0.0"
esprima@^2.7.1:
@@ -3425,7 +3427,7 @@ fs-extra@^1.0.0:
jsonfile "^2.1.0"
klaw "^1.0.0"
-fs-extra@^4.0.1, fs-extra@^4.0.2:
+fs-extra@^4.0.1:
version "4.0.3"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94"
dependencies:
@@ -3441,6 +3443,14 @@ fs-extra@^5.0.0:
jsonfile "^4.0.0"
universalify "^0.1.0"
+fs-extra@^6.0.1:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-6.0.1.tgz#8abc128f7946e310135ddc93b98bddb410e7a34b"
+ dependencies:
+ graceful-fs "^4.1.2"
+ jsonfile "^4.0.0"
+ universalify "^0.1.0"
+
fs-minipass@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d"
@@ -3757,9 +3767,9 @@ grouped-queue@^0.3.0:
dependencies:
lodash "^4.17.2"
-growl@1.10.3:
- version "1.10.3"
- resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.3.tgz#1926ba90cf3edfe2adb4927f5880bc22c66c790f"
+growl@1.10.5:
+ version "1.10.5"
+ resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e"
growly@^1.3.0:
version "1.3.0"
@@ -3900,6 +3910,12 @@ has@^1.0.1:
dependencies:
function-bind "^1.0.2"
+has@^1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
+ dependencies:
+ function-bind "^1.1.1"
+
hawk@3.1.3, hawk@~3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4"
@@ -4618,10 +4634,6 @@ jsx-ast-utils@^2.0.1:
dependencies:
array-includes "^3.0.3"
-just-extend@^1.1.27:
- version "1.1.27"
- resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-1.1.27.tgz#ec6e79410ff914e472652abfa0e603c03d60e905"
-
kind-of@^3.0.2:
version "3.2.2"
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
@@ -4783,10 +4795,6 @@ lodash.flattendeep@^4.4.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2"
-lodash.get@^4.4.2:
- version "4.4.2"
- resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
-
lodash.isarguments@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a"
@@ -4864,7 +4872,7 @@ lodash@^4.14.0, lodash@^4.15.0, lodash@^4.16.6, lodash@^4.2.1, lodash@^4.3.0, lo
version "4.17.4"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
-lodash@^4.17.4:
+lodash@^4.17.10, lodash@^4.17.4:
version "4.17.10"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
@@ -4878,10 +4886,6 @@ lolex@1.3.2:
version "1.3.2"
resolved "https://registry.yarnpkg.com/lolex/-/lolex-1.3.2.tgz#7c3da62ffcb30f0f5a80a2566ca24e45d8a01f31"
-lolex@^2.3.2, lolex@^2.4.2:
- version "2.7.0"
- resolved "https://registry.yarnpkg.com/lolex/-/lolex-2.7.0.tgz#9c087a69ec440e39d3f796767cf1b2cdc43d5ea5"
-
loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848"
@@ -5160,7 +5164,7 @@ min-document@^2.19.0:
dependencies:
dom-walk "^0.1.0"
-"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.4:
+"minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
dependencies:
@@ -5203,20 +5207,21 @@ mkdirp@0.5.1, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1:
dependencies:
minimist "0.0.8"
-mocha@^4.0.1:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/mocha/-/mocha-4.1.0.tgz#7d86cfbcf35cb829e2754c32e17355ec05338794"
+mocha@^5.2.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6"
dependencies:
- browser-stdout "1.3.0"
- commander "2.11.0"
+ browser-stdout "1.3.1"
+ commander "2.15.1"
debug "3.1.0"
- diff "3.3.1"
+ diff "3.5.0"
escape-string-regexp "1.0.5"
glob "7.1.2"
- growl "1.10.3"
+ growl "1.10.5"
he "1.1.1"
+ minimatch "3.0.4"
mkdirp "0.5.1"
- supports-color "4.4.0"
+ supports-color "5.4.0"
moment@^2.20.1:
version "2.20.1"
@@ -5318,16 +5323,6 @@ negotiator@0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9"
-nise@^1.3.3:
- version "1.4.1"
- resolved "https://registry.yarnpkg.com/nise/-/nise-1.4.1.tgz#78bc2b343d5ff1031ea9d1bb2c87a94c26db7250"
- dependencies:
- "@sinonjs/formatio" "^2.0.0"
- just-extend "^1.1.27"
- lolex "^2.3.2"
- path-to-regexp "^1.7.0"
- text-encoding "^0.6.4"
-
node-fetch@^1.0.1, node-fetch@^1.3.3:
version "1.7.3"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"
@@ -5987,6 +5982,14 @@ prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.8, prop-types@^15.5.9,
loose-envify "^1.3.1"
object-assign "^4.1.1"
+prop-types@^15.6.1:
+ version "15.6.1"
+ resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.1.tgz#36644453564255ddda391191fb3a125cbdf654ca"
+ dependencies:
+ fbjs "^0.8.16"
+ loose-envify "^1.3.1"
+ object-assign "^4.1.1"
+
ps-tree@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/ps-tree/-/ps-tree-1.1.0.tgz#b421b24140d6203f1ed3c76996b4427b08e8c014"
@@ -6509,6 +6512,10 @@ regex-cache@^0.4.2:
dependencies:
is-equal-shallow "^0.1.3"
+regexpp@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.1.0.tgz#0e3516dd0b7904f413d2d4193dce4618c3a689ab"
+
regexpu-core@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240"
@@ -6752,10 +6759,6 @@ samsam@1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.1.2.tgz#bec11fdc83a9fda063401210e40176c3024d1567"
-samsam@1.3.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.3.0.tgz#8d1d9350e25622da30de3e44ba692b5221ab7c50"
-
samsam@~1.1:
version "1.1.3"
resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.1.3.tgz#9f5087419b4d091f232571e7fa52e90b0f552621"
@@ -6983,18 +6986,6 @@ sinon@^1.9.1:
samsam "1.1.2"
util ">=0.10.3 <1"
-sinon@^6.0.0:
- version "6.0.0"
- resolved "https://registry.yarnpkg.com/sinon/-/sinon-6.0.0.tgz#f26627e4830dc34279661474da2c9e784f166215"
- dependencies:
- "@sinonjs/formatio" "^2.0.0"
- diff "^3.5.0"
- lodash.get "^4.4.2"
- lolex "^2.4.2"
- nise "^1.3.3"
- supports-color "^5.4.0"
- type-detect "^4.0.8"
-
slash@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
@@ -7347,11 +7338,11 @@ sumchecker@^2.0.2:
dependencies:
debug "^2.2.0"
-supports-color@4.4.0:
- version "4.4.0"
- resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e"
+supports-color@5.4.0:
+ version "5.4.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54"
dependencies:
- has-flag "^2.0.0"
+ has-flag "^3.0.0"
supports-color@^2.0.0:
version "2.0.0"
@@ -7369,12 +7360,6 @@ supports-color@^5.3.0:
dependencies:
has-flag "^3.0.0"
-supports-color@^5.4.0:
- version "5.4.0"
- resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54"
- dependencies:
- has-flag "^3.0.0"
-
symbol-observable@^1.0.3:
version "1.1.0"
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.1.0.tgz#5c68fd8d54115d9dfb72a84720549222e8db9b32"
@@ -7462,10 +7447,6 @@ term-size@^1.2.0:
dependencies:
execa "^0.7.0"
-text-encoding@^0.6.4:
- version "0.6.4"
- resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.6.4.tgz#e399a982257a276dae428bb92845cb71bdc26d19"
-
text-table@^0.2.0, text-table@~0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
@@ -7635,10 +7616,6 @@ type-detect@^4.0.0:
version "4.0.7"
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.7.tgz#862bd2cf6058ad92799ff5a5b8cf7b6cec726198"
-type-detect@^4.0.8:
- version "4.0.8"
- resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c"
-
type-is@~1.6.6:
version "1.6.15"
resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.15.tgz#cab10fb4909e441c82842eafe1ad646c81804410"
@@ -7989,7 +7966,7 @@ which@^1.2.12, which@^1.2.14, which@^1.2.8, which@^1.3.0:
dependencies:
isexe "^2.0.0"
-which@^1.2.9:
+which@^1.2.9, which@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
dependencies: