summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2017-08-07 09:59:42 +0100
committerAndrej Mihajlov <and@mullvad.net>2017-08-07 09:59:42 +0100
commit84297f94afca3c5eb8cddeaf11ec0ec7862eeed1 (patch)
tree3e00c7e1e7b314ea8f32b53ed64310ba440a23f2
parente13fe630fce123981e502939aafc3569a9412e0c (diff)
parentd4a94c7634ec8f396c81f3e3e65629ec37bff447 (diff)
downloadmullvadvpn-84297f94afca3c5eb8cddeaf11ec0ec7862eeed1.tar.xz
mullvadvpn-84297f94afca3c5eb8cddeaf11ec0ec7862eeed1.zip
Merge branch 'remove-unused-deps'
-rw-r--r--flow-typed/npm/isomorphic-fetch_v2.x.x.js7
-rw-r--r--flow-typed/npm/mocha_v3.1.x.js236
-rw-r--r--package.json2
-rw-r--r--test/mocks/redux.js6
-rw-r--r--yarn.lock6
5 files changed, 220 insertions, 37 deletions
diff --git a/flow-typed/npm/isomorphic-fetch_v2.x.x.js b/flow-typed/npm/isomorphic-fetch_v2.x.x.js
deleted file mode 100644
index ce5712ed7f..0000000000
--- a/flow-typed/npm/isomorphic-fetch_v2.x.x.js
+++ /dev/null
@@ -1,7 +0,0 @@
-// flow-typed signature: 28ad27471ba2cb831af6a1f17b7f0cf0
-// flow-typed version: f3161dc07c/isomorphic-fetch_v2.x.x/flow_>=v0.25.x
-
-
-declare module 'isomorphic-fetch' {
- declare module.exports: (input: string | Request, init?: RequestOptions) => Promise<Response>;
-}
diff --git a/flow-typed/npm/mocha_v3.1.x.js b/flow-typed/npm/mocha_v3.1.x.js
index 4f7a096caf..1a35f6e448 100644
--- a/flow-typed/npm/mocha_v3.1.x.js
+++ b/flow-typed/npm/mocha_v3.1.x.js
@@ -1,25 +1,221 @@
-// flow-typed signature: 5f3dd89c049243ddb5d45e60e5615827
-// flow-typed version: d0062bf209/mocha_v3.1.x/flow_>=v0.22.x
+// flow-typed signature: 58fb316c623a4f7918b0e2529256be8c
+// flow-typed version: 0ef6a9a08b/mocha_v3.1.x/flow_>=v0.28.x
-type TestFunction = ((done: (error?: any) => void) => void | Promise<mixed>);
+declare interface $npm$mocha$SetupOptions {
+ slow?: number;
+ timeout?: number;
+ ui?: string;
+ globals?: Array<any>;
+ reporter?: any;
+ bail?: boolean;
+ ignoreLeaks?: boolean;
+ grep?: any;
+}
-declare var describe : {
- (name:string, spec:() => void): void;
- only(description:string, spec:() => void): void;
- skip(description:string, spec:() => void): void;
- timeout(ms:number): void;
-};
+declare type $npm$mocha$done = (error?: any) => any;
-declare var context : typeof describe;
+// declare interface $npm$mocha$SuiteCallbackContext {
+// timeout(ms: number): void;
+// retries(n: number): void;
+// slow(ms: number): void;
+// }
-declare var it : {
- (name:string, spec?:TestFunction): void;
- only(description:string, spec:TestFunction): void;
- skip(description:string, spec:TestFunction): void;
- timeout(ms:number): void;
-};
+// declare interface $npm$mocha$TestCallbackContext {
+// skip(): void;
+// timeout(ms: number): void;
+// retries(n: number): void;
+// slow(ms: number): void;
+// [index: string]: any;
+// }
-declare function before(method : TestFunction):void;
-declare function beforeEach(method : TestFunction):void;
-declare function after(method : TestFunction):void;
-declare function afterEach(method : TestFunction):void;
+declare interface $npm$mocha$Suite {
+ parent: $npm$mocha$Suite;
+ title: string;
+ fullTitle(): string;
+}
+
+declare interface $npm$mocha$ContextDefinition {
+ (description: string, callback: (/* this: $npm$mocha$SuiteCallbackContext */) => void): $npm$mocha$Suite;
+ only(description: string, callback: (/* this: $npm$mocha$SuiteCallbackContext */) => void): $npm$mocha$Suite;
+ skip(description: string, callback: (/* this: $npm$mocha$SuiteCallbackContext */) => void): void;
+ timeout(ms: number): void;
+}
+
+declare interface $npm$mocha$TestDefinition {
+ (expectation: string, callback?: (/* this: $npm$mocha$TestCallbackContext, */ done: $npm$mocha$done) => mixed): $npm$mocha$Test;
+ only(expectation: string, callback?: (/* this: $npm$mocha$TestCallbackContext, */ done: $npm$mocha$done) => mixed): $npm$mocha$Test;
+ skip(expectation: string, callback?: (/* this: $npm$mocha$TestCallbackContext, */ done: $npm$mocha$done) => mixed): void;
+ timeout(ms: number): void;
+ state: 'failed' | 'passed';
+}
+
+declare interface $npm$mocha$Runner {}
+
+declare class $npm$mocha$BaseReporter {
+ stats: {
+ suites: number;
+ tests: number;
+ passes: number;
+ pending: number;
+ failures: number;
+ };
+
+ constructor(runner: $npm$mocha$Runner): $npm$mocha$BaseReporter;
+}
+
+declare class $npm$mocha$DocReporter extends $npm$mocha$BaseReporter {}
+declare class $npm$mocha$DotReporter extends $npm$mocha$BaseReporter {}
+declare class $npm$mocha$HTMLReporter extends $npm$mocha$BaseReporter {}
+declare class $npm$mocha$HTMLCovReporter extends $npm$mocha$BaseReporter {}
+declare class $npm$mocha$JSONReporter extends $npm$mocha$BaseReporter {}
+declare class $npm$mocha$JSONCovReporter extends $npm$mocha$BaseReporter {}
+declare class $npm$mocha$JSONStreamReporter extends $npm$mocha$BaseReporter {}
+declare class $npm$mocha$LandingReporter extends $npm$mocha$BaseReporter {}
+declare class $npm$mocha$ListReporter extends $npm$mocha$BaseReporter {}
+declare class $npm$mocha$MarkdownReporter extends $npm$mocha$BaseReporter {}
+declare class $npm$mocha$MinReporter extends $npm$mocha$BaseReporter {}
+declare class $npm$mocha$NyanReporter extends $npm$mocha$BaseReporter {}
+declare class $npm$mocha$ProgressReporter extends $npm$mocha$BaseReporter {
+ constructor(runner: $npm$mocha$Runner, options?: {
+ open?: string;
+ complete?: string;
+ incomplete?: string;
+ close?: string;
+ }): $npm$mocha$ProgressReporter;
+}
+declare class $npm$mocha$SpecReporter extends $npm$mocha$BaseReporter {}
+declare class $npm$mocha$TAPReporter extends $npm$mocha$BaseReporter {}
+declare class $npm$mocha$XUnitReporter extends $npm$mocha$BaseReporter {
+ constructor(runner: $npm$mocha$Runner, options?: any): $npm$mocha$XUnitReporter;
+}
+
+declare class $npm$mocha$Mocha {
+ currentTest: $npm$mocha$TestDefinition;
+ constructor(options?: {
+ grep?: RegExp;
+ ui?: string;
+ reporter?: string;
+ timeout?: number;
+ reporterOptions?: any;
+ slow?: number;
+ bail?: boolean;
+ }): $npm$mocha$Mocha;
+ setup(options: $npm$mocha$SetupOptions): this;
+ bail(value?: boolean): this;
+ addFile(file: string): this;
+ reporter(name: string): this;
+ reporter(reporter: (runner: $npm$mocha$Runner, options: any) => any): this;
+ ui(value: string): this;
+ grep(value: string): this;
+ grep(value: RegExp): this;
+ invert(): this;
+ ignoreLeaks(value: boolean): this;
+ checkLeaks(): this;
+ throwError(error: Error): void;
+ growl(): this;
+ globals(value: string): this;
+ globals(values: Array<string>): this;
+ useColors(value: boolean): this;
+ useInlineDiffs(value: boolean): this;
+ timeout(value: number): this;
+ slow(value: number): this;
+ enableTimeouts(value: boolean): this;
+ asyncOnly(value: boolean): this;
+ noHighlighting(value: boolean): this;
+ run(onComplete?: (failures: number) => void): $npm$mocha$Runner;
+
+ static reporters: {
+ Doc: $npm$mocha$DocReporter,
+ Dot: $npm$mocha$DotReporter,
+ HTML: $npm$mocha$HTMLReporter,
+ HTMLCov: $npm$mocha$HTMLCovReporter,
+ JSON: $npm$mocha$JSONReporter,
+ JSONCov: $npm$mocha$JSONCovReporter,
+ JSONStream: $npm$mocha$JSONStreamReporter,
+ Landing: $npm$mocha$LandingReporter,
+ List: $npm$mocha$ListReporter,
+ Markdown: $npm$mocha$MarkdownReporter,
+ Min: $npm$mocha$MinReporter,
+ Nyan: $npm$mocha$NyanReporter,
+ Progress: $npm$mocha$ProgressReporter,
+ };
+}
+
+// declare interface $npm$mocha$HookCallbackContext {
+// skip(): void;
+// timeout(ms: number): void;
+// [index: string]: any;
+// }
+
+declare interface $npm$mocha$Runnable {
+ title: string;
+ fn: Function;
+ async: boolean;
+ sync: boolean;
+ timedOut: boolean;
+}
+
+declare interface $npm$mocha$Test extends $npm$mocha$Runnable {
+ parent: $npm$mocha$Suite;
+ pending: boolean;
+ state: 'failed' | 'passed' | void;
+ fullTitle(): string;
+}
+
+// declare interface $npm$mocha$BeforeAndAfterContext extends $npm$mocha$HookCallbackContext {
+// currentTest: $npm$mocha$Test;
+// }
+
+declare var mocha: $npm$mocha$Mocha;
+declare var describe: $npm$mocha$ContextDefinition;
+declare var xdescribe: $npm$mocha$ContextDefinition;
+declare var context: $npm$mocha$ContextDefinition;
+declare var suite: $npm$mocha$ContextDefinition;
+declare var it: $npm$mocha$TestDefinition;
+declare var xit: $npm$mocha$TestDefinition;
+declare var test: $npm$mocha$TestDefinition;
+declare var specify: $npm$mocha$TestDefinition;
+
+declare function run(): void;
+
+declare function setup(callback: (/* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done) => mixed): void;
+declare function teardown(callback: (/* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done) => mixed): void;
+declare function suiteSetup(callback: (/* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done) => mixed): void;
+declare function suiteTeardown(callback: (/* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done) => mixed): void;
+declare function before(callback: (/* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done) => mixed): void;
+declare function before(description: string, callback: (/* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done) => mixed): void;
+declare function after(callback: (/* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done) => mixed): void;
+declare function after(description: string, callback: (/* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done) => mixed): void;
+declare function beforeEach(callback: (/* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done) => mixed): void;
+declare function beforeEach(description: string, callback: (/* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done) => mixed): void;
+declare function afterEach(callback: (/* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done) => mixed): void;
+declare function afterEach(description: string, callback: (/* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done) => mixed): void;
+
+declare module "mocha" {
+ declare export var mocha: typeof mocha;
+ declare export var describe: typeof describe;
+ declare export var xdescribe: typeof xdescribe;
+ declare export var context: typeof context;
+ declare export var suite: typeof suite;
+ declare export var it: typeof it;
+ declare export var xit: typeof xit;
+ declare export var test: typeof test;
+ declare export var specify: typeof specify;
+
+ declare export var run: typeof run;
+
+ declare export var setup: typeof setup;
+ declare export var teardown: typeof teardown;
+ declare export var suiteSetup: typeof suiteSetup;
+ declare export var suiteTeardown: typeof suiteTeardown;
+ declare export var before: typeof before;
+ declare export var before: typeof before;
+ declare export var after: typeof after;
+ declare export var after: typeof after;
+ declare export var beforeEach: typeof beforeEach;
+ declare export var beforeEach: typeof beforeEach;
+ declare export var afterEach: typeof afterEach;
+ declare export var afterEach: typeof afterEach;
+
+ declare export default $npm$mocha$Mocha;
+}
diff --git a/package.json b/package.json
index 00e7ac00bc..2d3f89e984 100644
--- a/package.json
+++ b/package.json
@@ -57,8 +57,6 @@
"eslint-plugin-react": "^7.1.0",
"flow-bin": "^0.50.0",
"flow-typed": "^2.1.5",
- "isomorphic-fetch": "^2.2.1",
- "mocha": "^3.2.0",
"npm-run-all": "^4.0.1",
"redux-mock-store": "^1.2.2",
"rimraf": "^2.5.4"
diff --git a/test/mocks/redux.js b/test/mocks/redux.js
index 070c76c9b2..9d4759b1d3 100644
--- a/test/mocks/redux.js
+++ b/test/mocks/redux.js
@@ -2,10 +2,6 @@ import configureMockStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import { defaultServer } from '../../app/config';
-// fetch is absent in node environment
-// this will automatically import it into global scope
-import fetch from 'isomorphic-fetch'; // eslint-disable-line no-unused-vars
-
const middlewares = [ thunk ];
export const mockStore = configureMockStore(middlewares);
export const mockState = () => {
@@ -36,7 +32,7 @@ export const filterMinorActions = (actions) => {
if(action.type === 'CONNECTION_CHANGE' && action.payload.isOnline) {
return false;
}
-
+
if(action.type === 'USER_LOGIN_CHANGE' && action.payload.city) {
return false;
}
diff --git a/yarn.lock b/yarn.lock
index 682f60282c..866633aec5 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3191,7 +3191,7 @@ isobject@^2.0.0:
dependencies:
isarray "1.0.0"
-isomorphic-fetch@^2.1.1, isomorphic-fetch@^2.2.1:
+isomorphic-fetch@^2.1.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9"
dependencies:
@@ -3451,7 +3451,7 @@ lodash@^3.10.1:
version "3.10.1"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"
-lodash@^4.0.0, lodash@^4.13.1, lodash@^4.15.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0:
+lodash@^4.0.0, lodash@^4.15.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0:
version "4.17.4"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
@@ -3653,7 +3653,7 @@ mkdirp@0.5.0:
dependencies:
minimist "0.0.8"
-mocha@^3.0.0, mocha@^3.2.0:
+mocha@^3.0.0:
version "3.4.2"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.4.2.tgz#d0ef4d332126dbf18d0d640c9b382dd48be97594"
dependencies: