diff --git a/common/libs/contract.ts b/common/libs/contract.ts index 4afb180d429..4f5ef32a9e5 100644 --- a/common/libs/contract.ts +++ b/common/libs/contract.ts @@ -12,10 +12,10 @@ interface ABITypedSlot { interface ABIMethod { name: string; - type: 'function'; - constant: boolean; + type: string; + constant?: boolean; inputs: ABITypedSlot[]; - outputs: ABITypedSlot[]; + outputs?: ABITypedSlot[]; // default - false payable?: boolean; } diff --git a/jest_config/__mocks__/fileMock.ts b/jest_config/__mocks__/fileMock.ts new file mode 100644 index 00000000000..86059f36292 --- /dev/null +++ b/jest_config/__mocks__/fileMock.ts @@ -0,0 +1 @@ +module.exports = 'test-file-stub'; diff --git a/spec/mocks/localStorage.ts b/jest_config/__mocks__/localStorage.ts similarity index 73% rename from spec/mocks/localStorage.ts rename to jest_config/__mocks__/localStorage.ts index 027b15ffacf..162930d4acb 100644 --- a/spec/mocks/localStorage.ts +++ b/jest_config/__mocks__/localStorage.ts @@ -1,4 +1,4 @@ -export default class LocalStorageMock { +class LocalStorageMock { private store: object; constructor() { @@ -21,3 +21,7 @@ export default class LocalStorageMock { delete this.store[key]; } } + +Object.defineProperty(window, 'localStorage', { + value: new LocalStorageMock() +}); diff --git a/jest_config/__mocks__/styleMock.ts b/jest_config/__mocks__/styleMock.ts new file mode 100644 index 00000000000..f053ebf7976 --- /dev/null +++ b/jest_config/__mocks__/styleMock.ts @@ -0,0 +1 @@ +module.exports = {}; diff --git a/jest_config/jest.config.json b/jest_config/jest.config.json index d72fed623a3..7833cd97d13 100644 --- a/jest_config/jest.config.json +++ b/jest_config/jest.config.json @@ -1,17 +1,22 @@ { + "rootDir": "../", "transform": { "^.+\\.tsx?$": "/node_modules/ts-jest/preprocessor.js" }, "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", - "moduleFileExtensions": [ - "ts", - "tsx", - "js", - "jsx", - "json" - ], + "moduleDirectories": ["node_modules", "common"], + "moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json"], + "moduleNameMapper": { + "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": + "/jest_config/__mocks__/fileMock.ts", + "\\.(css|scss|less)$": "/jest_config/__mocks__/styleMock.ts" + }, "testPathIgnorePatterns": ["/common/config"], - "setupFiles": ["/jest_config/setupJest.js"], + "setupFiles": [ + "/jest_config/setupJest.js", + "/jest_config/__mocks__/localStorage.ts" + ], "automock": false, - "moduleDirectories": ["node_modules", "common"] + "snapshotSerializers": ["enzyme-to-json/serializer"], + "browser": true } diff --git a/package-lock.json b/package-lock.json index 453382a0d03..c8769c0aab0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,9 +23,9 @@ "dev": true }, "@types/jest": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-21.1.0.tgz", - "integrity": "sha512-7W+tgzauU0s467L7SG1GuHKr4jOmMTXOvR78LP6/YfuaM8JNRF+ayV2+vmNmlaBhbNPvckeJfak2aP+7VJ3g5A==", + "version": "21.1.4", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-21.1.4.tgz", + "integrity": "sha512-CItNfCz6osAOxdhWMbUYbSz0iMGKuxDHu/0iaqnsGKQd98OY2J8EBtVQvozc3gXvPh2Y3uAjTGgqYv8rEj6qzA==", "dev": true }, "@types/lodash": { @@ -380,9 +380,9 @@ } }, "ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", + "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==", "dev": true }, "ansi-html": { @@ -581,6 +581,12 @@ "integrity": "sha1-ECyenpAF0+fjgpvwxPok7oYu6bk=", "dev": true }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, "async": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", @@ -1007,14 +1013,13 @@ } }, "babel-jest": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-19.0.0.tgz", - "integrity": "sha1-WTI87ZmjqE01naIZyogQdP/Gzj8=", + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-21.2.0.tgz", + "integrity": "sha512-O0W2qLoWu1QOoOGgxiR2JID4O6WSpxPiQanrkyi9SSlM0PJ60Ptzlck47lhtnr9YZO3zYOsxHwnyeWJ6AffoBQ==", "dev": true, "requires": { - "babel-core": "6.25.0", "babel-plugin-istanbul": "4.1.5", - "babel-preset-jest": "19.0.0" + "babel-preset-jest": "21.2.0" } }, "babel-messages": { @@ -1056,9 +1061,9 @@ } }, "babel-plugin-jest-hoist": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-19.0.0.tgz", - "integrity": "sha1-SuKgTqYSpuc2UfP95SwXiZEwS+o=", + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-21.2.0.tgz", + "integrity": "sha512-yi5QuiVyyvhBUDLP4ButAnhYzkdrUwWDtvUJv71hjH3fclhnZg4HkDeqaitcR2dZZx/E67kGkRcPVjtVu+SJfQ==", "dev": true }, "babel-plugin-minify-builtins": { @@ -1156,6 +1161,12 @@ "babel-helper-is-void-0": "0.2.0" } }, + "babel-plugin-syntax-object-rest-spread": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", + "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", + "dev": true + }, "babel-plugin-transform-es2015-arrow-functions": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", @@ -1489,12 +1500,13 @@ } }, "babel-preset-jest": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-19.0.0.tgz", - "integrity": "sha1-ItZyAdAjJKGVgRKI6zgpS7PKw5Y=", + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-21.2.0.tgz", + "integrity": "sha512-hm9cBnr2h3J7yXoTtAVV0zg+3vg0Q/gT2GYuzlreTU0EPkJRtlNgKJJ3tBKEn0+VjAi3JykV6xCJkuUYttEEfA==", "dev": true, "requires": { - "babel-plugin-jest-hoist": "19.0.0" + "babel-plugin-jest-hoist": "21.2.0", + "babel-plugin-syntax-object-rest-spread": "6.13.0" } }, "babel-preset-minify": { @@ -2300,27 +2312,34 @@ } }, "cheerio": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz", - "integrity": "sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=", + "version": "1.0.0-rc.2", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.2.tgz", + "integrity": "sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs=", "dev": true, "requires": { "css-select": "1.2.0", "dom-serializer": "0.1.0", "entities": "1.1.1", "htmlparser2": "3.9.2", - "lodash.assignin": "4.2.0", - "lodash.bind": "4.2.1", - "lodash.defaults": "4.2.0", - "lodash.filter": "4.6.0", - "lodash.flatten": "4.4.0", - "lodash.foreach": "4.5.0", - "lodash.map": "4.6.0", - "lodash.merge": "4.6.0", - "lodash.pick": "4.4.0", - "lodash.reduce": "4.6.0", - "lodash.reject": "4.6.0", - "lodash.some": "4.6.0" + "lodash": "4.17.4", + "parse5": "3.0.2" + }, + "dependencies": { + "@types/node": { + "version": "6.0.90", + "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.90.tgz", + "integrity": "sha512-tXoGRVdi7wZX7P1VWoV9Wfk0uYDOAHdEYXAttuWgSrN76Q32wQlSrMX0Rgyv3RTEaQY2ZLQrzYHVM2e8rfo8sA==", + "dev": true + }, + "parse5": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.2.tgz", + "integrity": "sha1-Be/1fw70V3+xRKefi5qWemzERRA=", + "dev": true, + "requires": { + "@types/node": "6.0.90" + } + } } }, "chokidar": { @@ -3509,6 +3528,12 @@ "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.1.tgz", "integrity": "sha1-082BIh4+pAdCz83lVtTpnpjdxxs=" }, + "discontinuous-range": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", + "integrity": "sha1-44Mx8IRLukm5qctxx3FYWqsbxlo=", + "dev": true + }, "dom-converter": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.1.4.tgz", @@ -3773,29 +3798,55 @@ } }, "enzyme": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/enzyme/-/enzyme-2.9.1.tgz", - "integrity": "sha1-B9XOaRJBJA+4F78sSxjW5TAkDfY=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/enzyme/-/enzyme-3.1.0.tgz", + "integrity": "sha1-2MqECFeQ+87G7UC63RRHj67kwlo=", "dev": true, "requires": { - "cheerio": "0.22.0", - "function.prototype.name": "1.0.2", + "cheerio": "1.0.0-rc.2", + "function.prototype.name": "1.0.3", "is-subset": "0.1.1", "lodash": "4.17.4", "object-is": "1.0.1", "object.assign": "4.0.4", "object.entries": "1.0.4", "object.values": "1.0.4", + "raf": "3.4.0", + "rst-selector-parser": "2.2.2" + } + }, + "enzyme-adapter-react-16": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.0.2.tgz", + "integrity": "sha512-ePlf3ikzau4NatDCzBP1Y/rFgLhR6MnS1YQVrxD2KXFI31nE1HtL+6ciqALF8kHe5q7Y7lFAd1MYOLIriRqgcw==", + "dev": true, + "requires": { + "enzyme-adapter-utils": "1.0.1", + "lodash": "4.17.4", + "object.assign": "4.0.4", + "object.values": "1.0.4", "prop-types": "15.5.10", - "uuid": "3.1.0" - }, - "dependencies": { - "uuid": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==", - "dev": true - } + "react-test-renderer": "16.0.0" + } + }, + "enzyme-adapter-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/enzyme-adapter-utils/-/enzyme-adapter-utils-1.0.1.tgz", + "integrity": "sha1-/NgSIzOaVaMS91UmQeBFxAQIQAk=", + "dev": true, + "requires": { + "lodash": "4.17.4", + "object.assign": "4.0.4", + "prop-types": "15.5.10" + } + }, + "enzyme-to-json": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/enzyme-to-json/-/enzyme-to-json-3.1.4.tgz", + "integrity": "sha512-bGXQxsbVdRqn3ebWej90ADH+RmlKXwy4SgMWc1gG4oDKlVHEsu2eP6hMA4zFGMlQqTxgyd1XPcsryo6Ti4YG+Q==", + "dev": true, + "requires": { + "lodash": "4.17.4" } }, "errno": { @@ -3826,15 +3877,24 @@ } }, "es-abstract": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.7.0.tgz", - "integrity": "sha1-363ndOAb/Nl/lhgCmMRJyGI/uUw=", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.9.0.tgz", + "integrity": "sha512-kk3IJoKo7A3pWJc0OV8yZ/VEX2oSUytfekrJiqoxBlKJMFAJVJVpGdHClCCTdv+Fn2zHfpDHHIelMFhZVfef3Q==", "dev": true, "requires": { "es-to-primitive": "1.1.1", - "function-bind": "1.1.0", + "function-bind": "1.1.1", + "has": "1.0.1", "is-callable": "1.1.3", "is-regex": "1.0.4" + }, + "dependencies": { + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + } } }, "es-to-primitive": { @@ -4007,7 +4067,7 @@ "dev": true }, "ethereum-blockies": { - "version": "git+https://github.com/MyEtherWallet/blockies.git#8c40d1a9f24282a51c0727dba39460f0642dcac4" + "version": "git+https://github.com/MyEtherWallet/blockies.git#d36f87e50149aacafb34f099fe0bea1df76e010c" }, "ethereum-common": { "version": "0.0.18", @@ -4202,97 +4262,6 @@ "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-1.0.3.tgz", "integrity": "sha1-bDAzIxd6YrGyLAcCefeGEoe2mxo=" }, - "expect": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-21.1.0.tgz", - "integrity": "sha512-gBmUVy+A4+brj/MnuiwLe+MIMfSffWUmZMNjKHrMkB0cpkAjnFdwHAxs6MvYeh4+14ocp+SfKp4ebNEhkbV3YQ==", - "dev": true, - "requires": { - "ansi-styles": "3.2.0", - "jest-diff": "21.1.0", - "jest-get-type": "21.0.2", - "jest-matcher-utils": "21.1.0", - "jest-message-util": "21.1.0", - "jest-regex-util": "21.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", - "dev": true, - "requires": { - "color-convert": "1.9.0" - } - }, - "chalk": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", - "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", - "dev": true, - "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.4.0" - } - }, - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true - }, - "jest-diff": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-21.1.0.tgz", - "integrity": "sha512-mGJinKrAB6hj1cpO1FOuDCfgILozGvYi4Zpk8GrxmNgdd9/9llIA2Xzu5879Fa4ayh7lb9ej2NdvuNLMCjbrMg==", - "dev": true, - "requires": { - "chalk": "2.1.0", - "diff": "3.3.0", - "jest-get-type": "21.0.2", - "pretty-format": "21.1.0" - } - }, - "jest-matcher-utils": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-21.1.0.tgz", - "integrity": "sha512-V/Xindf+VY5UM+oz9Nhsv0Ql93lRcKS7tHtVoXtlXkZXoXpydHwuezkLLCpZkH/Uew5y2OyDZpnlxPvEalJZng==", - "dev": true, - "requires": { - "chalk": "2.1.0", - "jest-get-type": "21.0.2", - "pretty-format": "21.1.0" - } - }, - "jest-message-util": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-21.1.0.tgz", - "integrity": "sha512-BwKrjR4HvGoodYw3PFh95IU4qDk3nVOf3LqOKRaaR6486bJM8IZIlxWR8yfxhAN7nDGBDco/TR+U50WcPgzvgA==", - "dev": true, - "requires": { - "chalk": "2.1.0", - "micromatch": "2.3.11", - "slash": "1.0.0" - } - }, - "jest-regex-util": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-21.1.0.tgz", - "integrity": "sha512-1QiJa6nvdzVgDhY1FTG3fl+2eYrCQGQoIeGaVPjt9+VmxsQ/BwZD6aglH0z6ZK/uEXZPAaj1XaemKM9tC6VVlQ==", - "dev": true - }, - "supports-color": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", - "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", - "dev": true, - "requires": { - "has-flag": "2.0.0" - } - } - } - }, "express": { "version": "4.15.4", "resolved": "https://registry.npmjs.org/express/-/express-4.15.4.tgz", @@ -5602,9 +5571,9 @@ "dev": true }, "function.prototype.name": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.0.2.tgz", - "integrity": "sha512-RbgGSvTDidZb8VOznhL/1EUKahRdFtyqyatfqU3OJCT7zmQYnaaMj72SRn5mmFep5tdUjsEn0RgHjhJ++gd7Dg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.0.3.tgz", + "integrity": "sha512-5EblxZUdioXi2JiMZ9FUbwYj40eQ9MFHyzFLBSPdlRl3SO8l7SLWuAnQ/at/1Wi4hjJwME/C5WpF2ZfAc8nGNw==", "dev": true, "requires": { "define-properties": "1.1.2", @@ -6002,9 +5971,9 @@ } }, "handlebars": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.10.tgz", - "integrity": "sha1-PTDHGLCaPZbyPqTMH0A8TTup/08=", + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", + "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", "dev": true, "requires": { "async": "1.5.2", @@ -7225,77 +7194,157 @@ "integrity": "sha1-D7Lj9qqZIr085F0F2KtNXo4HvU8=", "dev": true, "requires": { - "handlebars": "4.0.10" + "handlebars": "4.0.11" } }, "jest": { - "version": "19.0.2", - "resolved": "https://registry.npmjs.org/jest/-/jest-19.0.2.tgz", - "integrity": "sha1-t5T6r4/0Yec4jyi+71WaVPILLBA=", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest/-/jest-21.2.1.tgz", + "integrity": "sha512-mXN0ppPvWYoIcC+R+ctKxAJ28xkt/Z5Js875padm4GbgUn6baeR5N4Ng6LjatIRpUQDZVJABT7Y4gucFjPryfw==", "dev": true, "requires": { - "jest-cli": "19.0.2" + "jest-cli": "21.2.1" }, "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + }, + "chalk": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.0.tgz", + "integrity": "sha512-0BMM/2hG3ZaoPfR6F+h/oWpZtsh3b/s62TjSM6MGCJWEbJDN1acqCXvyhhZsDSVFklpebUoQ5O1kKC7lOzrn9g==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, "jest-cli": { - "version": "19.0.2", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-19.0.2.tgz", - "integrity": "sha1-zDYgtirKxfLZOlSMtu9pfU7IVEM=", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-21.2.1.tgz", + "integrity": "sha512-T1BzrbFxDIW/LLYQqVfo94y/hhaj1NzVQkZgBumAC+sxbjMROI7VkihOdxNR758iYbQykL2ZOWUBurFgkQrzdg==", "dev": true, "requires": { - "ansi-escapes": "1.4.0", - "callsites": "2.0.0", - "chalk": "1.1.3", + "ansi-escapes": "3.0.0", + "chalk": "2.2.0", + "glob": "7.1.2", "graceful-fs": "4.1.11", "is-ci": "1.0.10", "istanbul-api": "1.1.14", "istanbul-lib-coverage": "1.1.1", "istanbul-lib-instrument": "1.8.0", - "jest-changed-files": "19.0.2", - "jest-config": "19.0.4", - "jest-environment-jsdom": "19.0.2", - "jest-haste-map": "19.0.2", - "jest-jasmine2": "19.0.2", - "jest-message-util": "19.0.0", - "jest-regex-util": "19.0.0", - "jest-resolve-dependencies": "19.0.0", - "jest-runtime": "19.0.4", - "jest-snapshot": "19.0.2", - "jest-util": "19.0.2", + "istanbul-lib-source-maps": "1.2.1", + "jest-changed-files": "21.2.0", + "jest-config": "21.2.1", + "jest-environment-jsdom": "21.2.1", + "jest-haste-map": "21.2.0", + "jest-message-util": "21.2.1", + "jest-regex-util": "21.2.0", + "jest-resolve-dependencies": "21.2.0", + "jest-runner": "21.2.1", + "jest-runtime": "21.2.1", + "jest-snapshot": "21.2.1", + "jest-util": "21.2.1", "micromatch": "2.3.11", "node-notifier": "5.1.2", + "pify": "3.0.0", "slash": "1.0.0", - "string-length": "1.0.1", - "throat": "3.2.0", + "string-length": "2.0.0", + "strip-ansi": "4.0.0", "which": "1.2.14", "worker-farm": "1.5.0", - "yargs": "6.6.0" + "yargs": "9.0.1" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "string-length": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz", + "integrity": "sha1-1A27aGo6zpYMHP/KVivyxF+DY+0=", + "dev": true, + "requires": { + "astral-regex": "1.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" } } } }, "jest-changed-files": { - "version": "19.0.2", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-19.0.2.tgz", - "integrity": "sha1-FsVMhMMnC+QI4G0uivPz43qIWCQ=", - "dev": true + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-21.2.0.tgz", + "integrity": "sha512-+lCNP1IZLwN1NOIvBcV5zEL6GENK6TXrDj4UxWIeLvIsIDa+gf6J7hkqsW2qVVt/wvH65rVvcPwqXdps5eclTQ==", + "dev": true, + "requires": { + "throat": "4.1.0" + } }, "jest-config": { - "version": "19.0.4", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-19.0.4.tgz", - "integrity": "sha1-QpgCEdRkF+kcp6v/0IbCcCNPc/0=", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-21.2.1.tgz", + "integrity": "sha512-fJru5HtlD/5l2o25eY9xT0doK3t2dlglrqoGpbktduyoI0T5CwuB++2YfoNZCrgZipTwPuAGonYv0q7+8yDc/A==", "dev": true, "requires": { - "chalk": "1.1.3", - "jest-environment-jsdom": "19.0.2", - "jest-environment-node": "19.0.2", - "jest-jasmine2": "19.0.2", - "jest-regex-util": "19.0.0", - "jest-resolve": "19.0.2", - "jest-validate": "19.0.2", - "pretty-format": "19.0.0" + "chalk": "2.2.0", + "glob": "7.1.2", + "jest-environment-jsdom": "21.2.1", + "jest-environment-node": "21.2.1", + "jest-get-type": "21.2.0", + "jest-jasmine2": "21.2.1", + "jest-regex-util": "21.2.0", + "jest-resolve": "21.2.0", + "jest-util": "21.2.1", + "jest-validate": "21.2.1", + "pretty-format": "21.2.1" }, "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, "ansi-styles": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", @@ -7305,41 +7354,80 @@ "color-convert": "1.9.0" } }, + "chalk": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.0.tgz", + "integrity": "sha512-0BMM/2hG3ZaoPfR6F+h/oWpZtsh3b/s62TjSM6MGCJWEbJDN1acqCXvyhhZsDSVFklpebUoQ5O1kKC7lOzrn9g==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "jest-get-type": { + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-21.2.0.tgz", + "integrity": "sha512-y2fFw3C+D0yjNSDp7ab1kcd6NUYfy3waPTlD8yWkAtiocJdBRQqNoRqVfMNxgj+IjT0V5cBIHJO0z9vuSSZ43Q==", + "dev": true + }, "jest-validate": { - "version": "19.0.2", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-19.0.2.tgz", - "integrity": "sha1-3FNN9fEnjVtj3zKxQkHU2/ckTAw=", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-21.2.1.tgz", + "integrity": "sha512-k4HLI1rZQjlU+EC682RlQ6oZvLrE5SCh3brseQc24vbZTxzT/k/3urar5QMCVgjadmSO7lECeGdc6YxnM3yEGg==", "dev": true, "requires": { - "chalk": "1.1.3", - "jest-matcher-utils": "19.0.0", + "chalk": "2.2.0", + "jest-get-type": "21.2.0", "leven": "2.1.0", - "pretty-format": "19.0.0" + "pretty-format": "21.2.1" } }, "pretty-format": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-19.0.0.tgz", - "integrity": "sha1-VlMNMqy5ij+khRxOK503tCBoTIQ=", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-21.2.1.tgz", + "integrity": "sha512-ZdWPGYAnYfcVP8yKA3zFjCn8s4/17TeYH28MXuC8vTp0o21eXjbFGcOAXZEaDaOFJjc3h2qa7HQNHNshhvoh2A==", "dev": true, "requires": { + "ansi-regex": "3.0.0", "ansi-styles": "3.2.0" } + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } } } }, "jest-diff": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-19.0.0.tgz", - "integrity": "sha1-0VY8/FbItgIymI+8BdTRbtkPBjw=", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-21.2.1.tgz", + "integrity": "sha512-E5fu6r7PvvPr5qAWE1RaUwIh/k6Zx/3OOkZ4rk5dBJkEWRrUuSgbMt2EO8IUTPTd6DOqU3LW6uTIwX5FRvXoFA==", "dev": true, "requires": { - "chalk": "1.1.3", + "chalk": "2.2.0", "diff": "3.3.0", - "jest-matcher-utils": "19.0.0", - "pretty-format": "19.0.0" + "jest-get-type": "21.2.0", + "pretty-format": "21.2.1" }, "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, "ansi-styles": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", @@ -7349,44 +7437,77 @@ "color-convert": "1.9.0" } }, + "chalk": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.0.tgz", + "integrity": "sha512-0BMM/2hG3ZaoPfR6F+h/oWpZtsh3b/s62TjSM6MGCJWEbJDN1acqCXvyhhZsDSVFklpebUoQ5O1kKC7lOzrn9g==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "jest-get-type": { + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-21.2.0.tgz", + "integrity": "sha512-y2fFw3C+D0yjNSDp7ab1kcd6NUYfy3waPTlD8yWkAtiocJdBRQqNoRqVfMNxgj+IjT0V5cBIHJO0z9vuSSZ43Q==", + "dev": true + }, "pretty-format": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-19.0.0.tgz", - "integrity": "sha1-VlMNMqy5ij+khRxOK503tCBoTIQ=", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-21.2.1.tgz", + "integrity": "sha512-ZdWPGYAnYfcVP8yKA3zFjCn8s4/17TeYH28MXuC8vTp0o21eXjbFGcOAXZEaDaOFJjc3h2qa7HQNHNshhvoh2A==", "dev": true, "requires": { + "ansi-regex": "3.0.0", "ansi-styles": "3.2.0" } + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } } } }, + "jest-docblock": { + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-21.2.0.tgz", + "integrity": "sha512-5IZ7sY9dBAYSV+YjQ0Ovb540Ku7AO9Z5o2Cg789xj167iQuZ2cG+z0f3Uct6WeYLbU6aQiM2pCs7sZ+4dotydw==", + "dev": true + }, "jest-environment-jsdom": { - "version": "19.0.2", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-19.0.2.tgz", - "integrity": "sha1-ztqFnEpLlKs15N59q1S5JvKT5KM=", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-21.2.1.tgz", + "integrity": "sha512-mecaeNh0eWmzNrUNMWARysc0E9R96UPBamNiOCYL28k7mksb1d0q6DD38WKP7ABffjnXyUWJPVaWRgUOivwXwg==", "dev": true, "requires": { - "jest-mock": "19.0.0", - "jest-util": "19.0.2", + "jest-mock": "21.2.0", + "jest-util": "21.2.1", "jsdom": "9.12.0" } }, "jest-environment-node": { - "version": "19.0.2", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-19.0.2.tgz", - "integrity": "sha1-boQHnbh+0h0MBeH5Zp8gexFv6Zs=", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-21.2.1.tgz", + "integrity": "sha512-R211867wx9mVBVHzrjGRGTy5cd05K7eqzQl/WyZixR/VkJ4FayS8qkKXZyYnwZi6Rxo6WEV81cDbiUx/GfuLNw==", "dev": true, "requires": { - "jest-mock": "19.0.0", - "jest-util": "19.0.2" + "jest-mock": "21.2.0", + "jest-util": "21.2.1" } }, - "jest-file-exists": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/jest-file-exists/-/jest-file-exists-19.0.0.tgz", - "integrity": "sha1-zKLlh6EeyS4kz+qz+KlNZX8/zrg=", - "dev": true - }, "jest-get-type": { "version": "21.0.2", "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-21.0.2.tgz", @@ -7394,39 +7515,33 @@ "dev": true }, "jest-haste-map": { - "version": "19.0.2", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-19.0.2.tgz", - "integrity": "sha1-KGSEw6Fuhtp4crCHfDXc4ww9bwc=", + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-21.2.0.tgz", + "integrity": "sha512-5LhsY/loPH7wwOFRMs+PT4aIAORJ2qwgbpMFlbWbxfN0bk3ZCwxJ530vrbSiTstMkYLao6JwBkLhCJ5XbY7ZHw==", "dev": true, "requires": { "fb-watchman": "2.0.0", "graceful-fs": "4.1.11", + "jest-docblock": "21.2.0", "micromatch": "2.3.11", - "sane": "1.5.0", + "sane": "2.2.0", "worker-farm": "1.5.0" } }, "jest-jasmine2": { - "version": "19.0.2", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-19.0.2.tgz", - "integrity": "sha1-FnmRrIJZgfsagArxJug6/MqDLHM=", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-21.2.1.tgz", + "integrity": "sha512-lw8FXXIEekD+jYNlStfgNsUHpfMWhWWCgHV7n0B7mA/vendH7vBFs8xybjQsDzJSduptBZJHqQX9SMssya9+3A==", "dev": true, "requires": { + "chalk": "2.2.0", + "expect": "21.2.1", "graceful-fs": "4.1.11", - "jest-matcher-utils": "19.0.0", - "jest-matchers": "19.0.0", - "jest-message-util": "19.0.0", - "jest-snapshot": "19.0.2" - } - }, - "jest-matcher-utils": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-19.0.0.tgz", - "integrity": "sha1-Xs2bY1ZdKwAfYfv37Ex/U3lkVk0=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "pretty-format": "19.0.0" + "jest-diff": "21.2.1", + "jest-matcher-utils": "21.2.1", + "jest-message-util": "21.2.1", + "jest-snapshot": "21.2.1", + "p-cancelable": "0.3.0" }, "dependencies": { "ansi-styles": { @@ -7438,117 +7553,355 @@ "color-convert": "1.9.0" } }, - "pretty-format": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-19.0.0.tgz", - "integrity": "sha1-VlMNMqy5ij+khRxOK503tCBoTIQ=", + "chalk": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.0.tgz", + "integrity": "sha512-0BMM/2hG3ZaoPfR6F+h/oWpZtsh3b/s62TjSM6MGCJWEbJDN1acqCXvyhhZsDSVFklpebUoQ5O1kKC7lOzrn9g==", "dev": true, "requires": { - "ansi-styles": "3.2.0" + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "expect": { + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-21.2.1.tgz", + "integrity": "sha512-orfQQqFRTX0jH7znRIGi8ZMR8kTNpXklTTz8+HGTpmTKZo3Occ6JNB5FXMb8cRuiiC/GyDqsr30zUa66ACYlYw==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "jest-diff": "21.2.1", + "jest-get-type": "21.2.0", + "jest-matcher-utils": "21.2.1", + "jest-message-util": "21.2.1", + "jest-regex-util": "21.2.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "jest-get-type": { + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-21.2.0.tgz", + "integrity": "sha512-y2fFw3C+D0yjNSDp7ab1kcd6NUYfy3waPTlD8yWkAtiocJdBRQqNoRqVfMNxgj+IjT0V5cBIHJO0z9vuSSZ43Q==", + "dev": true + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" } } } }, - "jest-matchers": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/jest-matchers/-/jest-matchers-19.0.0.tgz", - "integrity": "sha1-x07Mbr/sBvOEdnuk1vpKQtZ1V1Q=", + "jest-matcher-utils": { + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-21.2.1.tgz", + "integrity": "sha512-kn56My+sekD43dwQPrXBl9Zn9tAqwoy25xxe7/iY4u+mG8P3ALj5IK7MLHZ4Mi3xW7uWVCjGY8cm4PqgbsqMCg==", "dev": true, "requires": { - "jest-diff": "19.0.0", - "jest-matcher-utils": "19.0.0", - "jest-message-util": "19.0.0", - "jest-regex-util": "19.0.0" + "chalk": "2.2.0", + "jest-get-type": "21.2.0", + "pretty-format": "21.2.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + }, + "chalk": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.0.tgz", + "integrity": "sha512-0BMM/2hG3ZaoPfR6F+h/oWpZtsh3b/s62TjSM6MGCJWEbJDN1acqCXvyhhZsDSVFklpebUoQ5O1kKC7lOzrn9g==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "jest-get-type": { + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-21.2.0.tgz", + "integrity": "sha512-y2fFw3C+D0yjNSDp7ab1kcd6NUYfy3waPTlD8yWkAtiocJdBRQqNoRqVfMNxgj+IjT0V5cBIHJO0z9vuSSZ43Q==", + "dev": true + }, + "pretty-format": { + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-21.2.1.tgz", + "integrity": "sha512-ZdWPGYAnYfcVP8yKA3zFjCn8s4/17TeYH28MXuC8vTp0o21eXjbFGcOAXZEaDaOFJjc3h2qa7HQNHNshhvoh2A==", + "dev": true, + "requires": { + "ansi-regex": "3.0.0", + "ansi-styles": "3.2.0" + } + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } } }, "jest-message-util": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-19.0.0.tgz", - "integrity": "sha1-cheWuJwOTXYWBvm6jLgoo7YkZBY=", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-21.2.1.tgz", + "integrity": "sha512-EbC1X2n0t9IdeMECJn2BOg7buOGivCvVNjqKMXTzQOu7uIfLml+keUfCALDh8o4rbtndIeyGU8/BKfoTr/LVDQ==", "dev": true, "requires": { - "chalk": "1.1.3", - "micromatch": "2.3.11" + "chalk": "2.2.0", + "micromatch": "2.3.11", + "slash": "1.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + }, + "chalk": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.0.tgz", + "integrity": "sha512-0BMM/2hG3ZaoPfR6F+h/oWpZtsh3b/s62TjSM6MGCJWEbJDN1acqCXvyhhZsDSVFklpebUoQ5O1kKC7lOzrn9g==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } } }, "jest-mock": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-19.0.0.tgz", - "integrity": "sha1-ZwOGQelgerLOCOxKjLg6q7yJnQE=", + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-21.2.0.tgz", + "integrity": "sha512-aZDfyVf0LEoABWiY6N0d+O963dUQSyUa4qgzurHR3TBDPen0YxKCJ6l2i7lQGh1tVdsuvdrCZ4qPj+A7PievCw==", "dev": true }, "jest-regex-util": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-19.0.0.tgz", - "integrity": "sha1-t3VFhxEq7eFFZRC7H2r+dO9ZhpE=", + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-21.2.0.tgz", + "integrity": "sha512-BKQ1F83EQy0d9Jen/mcVX7D+lUt2tthhK/2gDWRgLDJRNOdRgSp1iVqFxP8EN1ARuypvDflRfPzYT8fQnoBQFQ==", "dev": true }, "jest-resolve": { - "version": "19.0.2", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-19.0.2.tgz", - "integrity": "sha1-V5NXXeTweuwy99f/DGwYGWPu+zw=", + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-21.2.0.tgz", + "integrity": "sha512-vefQ/Lr+VdNvHUZFQXWtOqHX3HEdOc2MtSahBO89qXywEbUxGPB9ZLP9+BHinkxb60UT2Q/tTDOS6rYc6Mwigw==", "dev": true, "requires": { "browser-resolve": "1.11.2", - "jest-haste-map": "19.0.2", - "resolve": "1.3.3" + "chalk": "2.2.0", + "is-builtin-module": "1.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + }, + "chalk": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.0.tgz", + "integrity": "sha512-0BMM/2hG3ZaoPfR6F+h/oWpZtsh3b/s62TjSM6MGCJWEbJDN1acqCXvyhhZsDSVFklpebUoQ5O1kKC7lOzrn9g==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } } }, "jest-resolve-dependencies": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-19.0.0.tgz", - "integrity": "sha1-p0GtH6CUFA5k7PJkKlBPg07OIu4=", + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-21.2.0.tgz", + "integrity": "sha512-ok8ybRFU5ScaAcfufIQrCbdNJSRZ85mkxJ1EhUp8Bhav1W1/jv/rl1Q6QoVQHObNxmKnbHVKrfLZbCbOsXQ+bQ==", "dev": true, "requires": { - "jest-file-exists": "19.0.0" + "jest-regex-util": "21.2.0" + } + }, + "jest-runner": { + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-21.2.1.tgz", + "integrity": "sha512-Anb72BOQlHqF/zETqZ2K20dbYsnqW/nZO7jV8BYENl+3c44JhMrA8zd1lt52+N7ErnsQMd2HHKiVwN9GYSXmrg==", + "dev": true, + "requires": { + "jest-config": "21.2.1", + "jest-docblock": "21.2.0", + "jest-haste-map": "21.2.0", + "jest-jasmine2": "21.2.1", + "jest-message-util": "21.2.1", + "jest-runtime": "21.2.1", + "jest-util": "21.2.1", + "pify": "3.0.0", + "throat": "4.1.0", + "worker-farm": "1.5.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } } }, "jest-runtime": { - "version": "19.0.4", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-19.0.4.tgz", - "integrity": "sha1-8WfZ8TR3UvICc2EGeSZIU0n8wkU=", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-21.2.1.tgz", + "integrity": "sha512-6omlpA3+NSE+rHwD0PQjNEjZeb2z+oRmuehMfM1tWQVum+E0WV3pFt26Am0DUfQkkPyTABvxITRjCUclYgSOsA==", "dev": true, "requires": { "babel-core": "6.25.0", - "babel-jest": "19.0.0", + "babel-jest": "21.2.0", "babel-plugin-istanbul": "4.1.5", - "chalk": "1.1.3", + "chalk": "2.2.0", + "convert-source-map": "1.5.0", "graceful-fs": "4.1.11", - "jest-config": "19.0.4", - "jest-file-exists": "19.0.0", - "jest-haste-map": "19.0.2", - "jest-regex-util": "19.0.0", - "jest-resolve": "19.0.2", - "jest-util": "19.0.2", + "jest-config": "21.2.1", + "jest-haste-map": "21.2.0", + "jest-regex-util": "21.2.0", + "jest-resolve": "21.2.0", + "jest-util": "21.2.1", "json-stable-stringify": "1.0.1", "micromatch": "2.3.11", + "slash": "1.0.0", "strip-bom": "3.0.0", - "yargs": "6.6.0" + "write-file-atomic": "2.3.0", + "yargs": "9.0.1" }, "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + }, + "chalk": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.0.tgz", + "integrity": "sha512-0BMM/2hG3ZaoPfR6F+h/oWpZtsh3b/s62TjSM6MGCJWEbJDN1acqCXvyhhZsDSVFklpebUoQ5O1kKC7lOzrn9g==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } } } }, "jest-snapshot": { - "version": "19.0.2", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-19.0.2.tgz", - "integrity": "sha1-nBshYhT3GHw4v9XHCx76sWsP9Qs=", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-21.2.1.tgz", + "integrity": "sha512-bpaeBnDpdqaRTzN8tWg0DqOTo2DvD3StOemxn67CUd1p1Po+BUpvePAp44jdJ7Pxcjfg+42o4NHw1SxdCA2rvg==", "dev": true, "requires": { - "chalk": "1.1.3", - "jest-diff": "19.0.0", - "jest-file-exists": "19.0.0", - "jest-matcher-utils": "19.0.0", - "jest-util": "19.0.2", + "chalk": "2.2.0", + "jest-diff": "21.2.1", + "jest-matcher-utils": "21.2.1", + "mkdirp": "0.5.1", "natural-compare": "1.4.0", - "pretty-format": "19.0.0" + "pretty-format": "21.2.1" }, "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, "ansi-styles": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", @@ -7558,33 +7911,65 @@ "color-convert": "1.9.0" } }, + "chalk": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.0.tgz", + "integrity": "sha512-0BMM/2hG3ZaoPfR6F+h/oWpZtsh3b/s62TjSM6MGCJWEbJDN1acqCXvyhhZsDSVFklpebUoQ5O1kKC7lOzrn9g==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, "pretty-format": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-19.0.0.tgz", - "integrity": "sha1-VlMNMqy5ij+khRxOK503tCBoTIQ=", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-21.2.1.tgz", + "integrity": "sha512-ZdWPGYAnYfcVP8yKA3zFjCn8s4/17TeYH28MXuC8vTp0o21eXjbFGcOAXZEaDaOFJjc3h2qa7HQNHNshhvoh2A==", "dev": true, "requires": { + "ansi-regex": "3.0.0", "ansi-styles": "3.2.0" } + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } } } }, "jest-util": { - "version": "19.0.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-19.0.2.tgz", - "integrity": "sha1-4KAjKiq55rK1Nmi9s1NMK1l37UE=", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-21.2.1.tgz", + "integrity": "sha512-r20W91rmHY3fnCoO7aOAlyfC51x2yeV3xF+prGsJAUsYhKeV670ZB8NO88Lwm7ASu8SdH0S+U+eFf498kjhA4g==", "dev": true, "requires": { - "chalk": "1.1.3", + "callsites": "2.0.0", + "chalk": "2.2.0", "graceful-fs": "4.1.11", - "jest-file-exists": "19.0.0", - "jest-message-util": "19.0.0", - "jest-mock": "19.0.0", - "jest-validate": "19.0.2", - "leven": "2.1.0", + "jest-message-util": "21.2.1", + "jest-mock": "21.2.0", + "jest-validate": "21.2.1", "mkdirp": "0.5.1" }, "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, "ansi-styles": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", @@ -7594,26 +7979,59 @@ "color-convert": "1.9.0" } }, + "chalk": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.2.0.tgz", + "integrity": "sha512-0BMM/2hG3ZaoPfR6F+h/oWpZtsh3b/s62TjSM6MGCJWEbJDN1acqCXvyhhZsDSVFklpebUoQ5O1kKC7lOzrn9g==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "jest-get-type": { + "version": "21.2.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-21.2.0.tgz", + "integrity": "sha512-y2fFw3C+D0yjNSDp7ab1kcd6NUYfy3waPTlD8yWkAtiocJdBRQqNoRqVfMNxgj+IjT0V5cBIHJO0z9vuSSZ43Q==", + "dev": true + }, "jest-validate": { - "version": "19.0.2", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-19.0.2.tgz", - "integrity": "sha1-3FNN9fEnjVtj3zKxQkHU2/ckTAw=", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-21.2.1.tgz", + "integrity": "sha512-k4HLI1rZQjlU+EC682RlQ6oZvLrE5SCh3brseQc24vbZTxzT/k/3urar5QMCVgjadmSO7lECeGdc6YxnM3yEGg==", "dev": true, "requires": { - "chalk": "1.1.3", - "jest-matcher-utils": "19.0.0", + "chalk": "2.2.0", + "jest-get-type": "21.2.0", "leven": "2.1.0", - "pretty-format": "19.0.0" + "pretty-format": "21.2.1" } }, "pretty-format": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-19.0.0.tgz", - "integrity": "sha1-VlMNMqy5ij+khRxOK503tCBoTIQ=", + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-21.2.1.tgz", + "integrity": "sha512-ZdWPGYAnYfcVP8yKA3zFjCn8s4/17TeYH28MXuC8vTp0o21eXjbFGcOAXZEaDaOFJjc3h2qa7HQNHNshhvoh2A==", "dev": true, "requires": { + "ansi-regex": "3.0.0", "ansi-styles": "3.2.0" } + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } } } }, @@ -8275,18 +8693,6 @@ "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=" }, - "lodash.assignin": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz", - "integrity": "sha1-uo31+4QesKPoBEIysOJjqNxqKKI=", - "dev": true - }, - "lodash.bind": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-4.2.1.tgz", - "integrity": "sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=", - "dev": true - }, "lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", @@ -8314,22 +8720,10 @@ "lodash._root": "3.0.1" } }, - "lodash.filter": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz", - "integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=", - "dev": true - }, - "lodash.flatten": { + "lodash.flattendeep": { "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", - "dev": true - }, - "lodash.foreach": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz", - "integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", "dev": true }, "lodash.isarguments": { @@ -8366,48 +8760,18 @@ "lodash.isarray": "3.0.4" } }, - "lodash.map": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", - "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=", - "dev": true - }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", "dev": true }, - "lodash.merge": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.0.tgz", - "integrity": "sha1-aYhLoUSsM/5plzemCG3v+t0PicU=", - "dev": true - }, "lodash.mergewith": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.0.tgz", "integrity": "sha1-FQzwoWeR9ZA7iJHqsVRgknS96lU=", "dev": true }, - "lodash.pick": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", - "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=", - "dev": true - }, - "lodash.reduce": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz", - "integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=", - "dev": true - }, - "lodash.reject": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.reject/-/lodash.reject-4.6.0.tgz", - "integrity": "sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU=", - "dev": true - }, "lodash.restparam": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", @@ -9003,6 +9367,17 @@ "xml-char-classes": "1.0.0" } }, + "nearley": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.11.0.tgz", + "integrity": "sha512-clqqhEuP0ZCJQ85Xv2I/4o2Gs/fvSR6fCg5ZHVE2c8evWyNk2G++ih4JOO3lMb/k/09x6ihQ2nzKUlB/APCWjg==", + "dev": true, + "requires": { + "nomnom": "1.6.2", + "railroad-diagrams": "1.0.0", + "randexp": "0.4.6" + } + }, "negotiator": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", @@ -9216,6 +9591,24 @@ } } }, + "nomnom": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/nomnom/-/nomnom-1.6.2.tgz", + "integrity": "sha1-hKZqJgF0QI/Ft3oY+IjszET7aXE=", + "dev": true, + "requires": { + "colors": "0.5.1", + "underscore": "1.4.4" + }, + "dependencies": { + "colors": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.5.1.tgz", + "integrity": "sha1-fQAj6usVTo7p/Oddy5I9DtFmd3Q=", + "dev": true + } + } + }, "noop-logger": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", @@ -9464,7 +9857,7 @@ "dev": true, "requires": { "define-properties": "1.1.2", - "es-abstract": "1.7.0", + "es-abstract": "1.9.0", "function-bind": "1.1.0", "has": "1.0.1" } @@ -9503,7 +9896,7 @@ "dev": true, "requires": { "define-properties": "1.1.2", - "es-abstract": "1.7.0", + "es-abstract": "1.9.0", "function-bind": "1.1.0", "has": "1.0.1" } @@ -10756,6 +11149,39 @@ "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", "dev": true }, + "raf": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.0.tgz", + "integrity": "sha512-pDP/NMRAXoTfrhCfyfSEwJAKLaxBU9eApMeBPB1TkDouZmvPerIClV8lTAd+uF8ZiTaVl69e1FCxQrAd/VTjGw==", + "dev": true, + "requires": { + "performance-now": "2.1.0" + }, + "dependencies": { + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + } + } + }, + "railroad-diagrams": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz", + "integrity": "sha1-635iZ1SN3t+4mcG5Dlc3RVnN234=", + "dev": true + }, + "randexp": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz", + "integrity": "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==", + "dev": true, + "requires": { + "discontinuous-range": "1.0.0", + "ret": "0.1.15" + } + }, "randomatic": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", @@ -11029,6 +11455,39 @@ "resolved": "https://registry.npmjs.org/react-router-redux/-/react-router-redux-4.0.8.tgz", "integrity": "sha1-InQDWWtRUeGCN32rg1tdRfD4BU4=" }, + "react-test-renderer": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.0.0.tgz", + "integrity": "sha1-n+e4MI8vcfKfw1bUECCG8THJyxU=", + "dev": true, + "requires": { + "fbjs": "0.8.16", + "object-assign": "4.1.1" + }, + "dependencies": { + "core-js": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", + "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=", + "dev": true + }, + "fbjs": { + "version": "0.8.16", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.16.tgz", + "integrity": "sha1-XmdDL1UNxBtXK/VYR7ispk5TN9s=", + "dev": true, + "requires": { + "core-js": "1.2.7", + "isomorphic-fetch": "2.2.1", + "loose-envify": "1.3.1", + "object-assign": "4.1.1", + "promise": "7.3.1", + "setimmediate": "1.0.5", + "ua-parser-js": "0.7.13" + } + } + } + }, "read-all-stream": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/read-all-stream/-/read-all-stream-3.1.0.tgz", @@ -11252,6 +11711,12 @@ "resolved": "https://registry.npmjs.org/redux-saga/-/redux-saga-0.15.4.tgz", "integrity": "sha1-J5gqlHKABTt+y7XTFwyDel/msmE=" }, + "redux-test-utils": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/redux-test-utils/-/redux-test-utils-0.1.3.tgz", + "integrity": "sha1-DYkQDxAPhsfHIUl26uzojn5Fv3Q=", + "dev": true + }, "regenerate": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.2.tgz", @@ -11562,6 +12027,12 @@ "onetime": "1.1.0" } }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, "rework": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/rework/-/rework-1.0.1.tgz", @@ -11618,6 +12089,16 @@ "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.0.0.tgz", "integrity": "sha1-nbOE/0uJqPYVY9kjldhiWxjzr7A=" }, + "rst-selector-parser": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.2.tgz", + "integrity": "sha512-T5yd2bsA+FVQ5xP8Ga62gXjOnEaMsYhbbslVB+Fe4R9lAZiF7DfTHRyBpV9xEZ772LwstCdDdkHkvkWIr47X8g==", + "dev": true, + "requires": { + "lodash.flattendeep": "4.4.0", + "nearley": "2.11.0" + } + }, "run-parallel": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.6.tgz", @@ -11639,38 +12120,19 @@ "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" }, "sane": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/sane/-/sane-1.5.0.tgz", - "integrity": "sha1-pK3q52TQSGIeyyfV+ez1ExAZOfM=", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/sane/-/sane-2.2.0.tgz", + "integrity": "sha512-OSJxhHO0CgPUw3lUm3GhfREAfza45smvEI9ozuFrxKG10GHVo0ryW9FK5VYlLvxj0SV7HVKHW0voYJIRu27GWg==", "dev": true, "requires": { "anymatch": "1.3.2", "exec-sh": "0.2.1", - "fb-watchman": "1.9.2", + "fb-watchman": "2.0.0", + "fsevents": "1.1.2", "minimatch": "3.0.4", "minimist": "1.2.0", "walker": "1.0.7", - "watch": "0.10.0" - }, - "dependencies": { - "bser": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bser/-/bser-1.0.2.tgz", - "integrity": "sha1-OBEWlwsqbe6lZG3RXdcnhES1YWk=", - "dev": true, - "requires": { - "node-int64": "0.4.0" - } - }, - "fb-watchman": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-1.9.2.tgz", - "integrity": "sha1-okz0eCf4LTj7Waaa1wt247auc4M=", - "dev": true, - "requires": { - "bser": "1.0.2" - } - } + "watch": "0.18.0" } }, "sass-graph": { @@ -12691,9 +13153,9 @@ } }, "throat": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/throat/-/throat-3.2.0.tgz", - "integrity": "sha512-/EY8VpvlqJ+sFtLPeOgc8Pl7kQVOWv0woD87KTXVHPIAE842FGT+rokxIhe8xIUP1cfgrkt0as0vDLjDiMtr8w==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz", + "integrity": "sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=", "dev": true }, "through": { @@ -12946,251 +13408,32 @@ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, "ts-jest": { - "version": "21.0.1", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-21.0.1.tgz", - "integrity": "sha512-MIX8uMMr7FSRT56GASXUxeorEs3x2iO+JwkVzUHwxjzld4+UtPMZ9EEUpX7JU7eFKDkXaD1aAIVnuNrg15Xnuw==", + "version": "21.1.3", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-21.1.3.tgz", + "integrity": "sha512-hTRIvxOjykHeuaNC9XkdNk+dbrt1NYzV3C6/CN4Ty9mCtBWrDLNCUtny9gKoIJS0UtwteuSmEdoLgr2biL+bDw==", "dev": true, "requires": { "babel-core": "6.25.0", "babel-plugin-istanbul": "4.1.5", "babel-plugin-transform-es2015-modules-commonjs": "6.24.1", - "babel-preset-jest": "21.0.2", + "babel-preset-jest": "21.2.0", "fs-extra": "4.0.2", - "jest-config": "21.1.0", - "jest-util": "21.1.0", - "pkg-dir": "2.0.0", - "source-map-support": "0.4.15", - "yargs": "8.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", - "dev": true, - "requires": { - "color-convert": "1.9.0" - } - }, - "babel-plugin-jest-hoist": { - "version": "21.0.2", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-21.0.2.tgz", - "integrity": "sha512-iQeYbiM0lr5TCW42qvGkBBoy0rTx6SPppRFT7NwvdnSwNOGMI8+1Oc27SF5wJbCvAY7x5KScP3f0TKtunl+NRw==", - "dev": true - }, - "babel-preset-jest": { - "version": "21.0.2", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-21.0.2.tgz", - "integrity": "sha512-WyzCFIoU+ga307hPnobHL9eRrZlpZYHQf7M3yOtimAwrLAgNFoSfin7ZVw903+zz81ZLuowZMKWCd0w3PNpAhg==", - "dev": true, - "requires": { - "babel-plugin-jest-hoist": "21.0.2" - } - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "chalk": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", - "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", - "dev": true, - "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.4.0" - } - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" - }, - "dependencies": { - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - } - } - }, - "fs-extra": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.2.tgz", - "integrity": "sha1-+RcExT0bRh+JNFKwwwfZmXZHq2s=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "jsonfile": "4.0.0", - "universalify": "0.1.1" - } - }, - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true - }, - "jest-config": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-21.1.0.tgz", - "integrity": "sha512-RQnWwHRSIRvtyJQeZTpXUmsNYVVr/qu3XWfV3FTFkDsxHQi6Sj5sfUK5FHCNUCXIuFTs+r3qbYoMz2q8rdm/EA==", - "dev": true, - "requires": { - "chalk": "2.1.0", - "glob": "7.1.2", - "jest-environment-jsdom": "21.1.0", - "jest-environment-node": "21.1.0", - "jest-get-type": "21.0.2", - "jest-jasmine2": "21.1.0", - "jest-regex-util": "21.1.0", - "jest-resolve": "21.1.0", - "jest-util": "21.1.0", - "jest-validate": "21.1.0", - "pretty-format": "21.1.0" - } - }, - "jest-diff": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-21.1.0.tgz", - "integrity": "sha512-mGJinKrAB6hj1cpO1FOuDCfgILozGvYi4Zpk8GrxmNgdd9/9llIA2Xzu5879Fa4ayh7lb9ej2NdvuNLMCjbrMg==", - "dev": true, - "requires": { - "chalk": "2.1.0", - "diff": "3.3.0", - "jest-get-type": "21.0.2", - "pretty-format": "21.1.0" - } - }, - "jest-environment-jsdom": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-21.1.0.tgz", - "integrity": "sha512-sMcGlN11SnnuJKzR5oJ5LsDRzHEBLUeMRImDbvxyusNW9l17wAEsoLuAWbv0W8crZTTwjRO6/mitpNF3PmVsMg==", - "dev": true, - "requires": { - "jest-mock": "21.1.0", - "jest-util": "21.1.0", - "jsdom": "9.12.0" - } - }, - "jest-environment-node": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-21.1.0.tgz", - "integrity": "sha512-Lv/pcK2zq2DZKL/q7+u8mrlSeXmaMGgmJOx0+Ew+FxYKdSzO0jpEUTEfzQOnMvpSWMqjKUYLDYkCPCBFcOX93w==", - "dev": true, - "requires": { - "jest-mock": "21.1.0", - "jest-util": "21.1.0" - } - }, - "jest-jasmine2": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-21.1.0.tgz", - "integrity": "sha512-YjbAaXN6K5f8rtwPVxkMRIYNZGB5GiJcApcj/5ER7uGJrqJMqyCklMAPZR5Gq8XPzzuDVfoB2h7kxyOGVqaxrw==", - "dev": true, - "requires": { - "chalk": "2.1.0", - "expect": "21.1.0", - "graceful-fs": "4.1.11", - "jest-diff": "21.1.0", - "jest-matcher-utils": "21.1.0", - "jest-message-util": "21.1.0", - "jest-snapshot": "21.1.0", - "p-cancelable": "0.3.0" - } - }, - "jest-matcher-utils": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-21.1.0.tgz", - "integrity": "sha512-V/Xindf+VY5UM+oz9Nhsv0Ql93lRcKS7tHtVoXtlXkZXoXpydHwuezkLLCpZkH/Uew5y2OyDZpnlxPvEalJZng==", - "dev": true, - "requires": { - "chalk": "2.1.0", - "jest-get-type": "21.0.2", - "pretty-format": "21.1.0" - } - }, - "jest-message-util": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-21.1.0.tgz", - "integrity": "sha512-BwKrjR4HvGoodYw3PFh95IU4qDk3nVOf3LqOKRaaR6486bJM8IZIlxWR8yfxhAN7nDGBDco/TR+U50WcPgzvgA==", - "dev": true, - "requires": { - "chalk": "2.1.0", - "micromatch": "2.3.11", - "slash": "1.0.0" - } - }, - "jest-mock": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-21.1.0.tgz", - "integrity": "sha512-iwING4rMP1rhepAj/MVPHVxGltwwR+Lfmiy9ARevQ7XDZ/zF7h+KPFeOFMSMGvV5/dS05PHhwRjFzrjvkybNLw==", - "dev": true - }, - "jest-regex-util": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-21.1.0.tgz", - "integrity": "sha512-1QiJa6nvdzVgDhY1FTG3fl+2eYrCQGQoIeGaVPjt9+VmxsQ/BwZD6aglH0z6ZK/uEXZPAaj1XaemKM9tC6VVlQ==", - "dev": true - }, - "jest-resolve": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-21.1.0.tgz", - "integrity": "sha512-HKh0pnf2SwR3hDaToONjHrR9ds282QFkxCA9xMet3JpsdLL24oRYMLSQ7jtepZfA6EP+XycRE6RfcMBD8emetg==", - "dev": true, - "requires": { - "browser-resolve": "1.11.2", - "chalk": "2.1.0", - "is-builtin-module": "1.0.0" - } - }, - "jest-snapshot": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-21.1.0.tgz", - "integrity": "sha512-oYASKqxO/Ghbdd96z/3KSQ1y4YUtqrQVzSKbnz3yjGsi1nu3AXMPmjRCM/CZXL+H+DAIgMirj5Uq0dZOxo6Bnw==", - "dev": true, - "requires": { - "chalk": "2.1.0", - "jest-diff": "21.1.0", - "jest-matcher-utils": "21.1.0", - "mkdirp": "0.5.1", - "natural-compare": "1.4.0", - "pretty-format": "21.1.0" - } - }, - "jest-util": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-21.1.0.tgz", - "integrity": "sha512-PJxaShBieLpB55NV4+loIZHiOlfZHjAGzVRp9BDzrr2m70UxQViDJenNdz4edJMWXJLjp817t1QrWi+LjcRaKw==", + "jest-config": "21.2.1", + "jest-util": "21.2.1", + "pkg-dir": "2.0.0", + "source-map-support": "0.5.0", + "yargs": "9.0.1" + }, + "dependencies": { + "fs-extra": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.2.tgz", + "integrity": "sha1-+RcExT0bRh+JNFKwwwfZmXZHq2s=", "dev": true, "requires": { - "callsites": "2.0.0", - "chalk": "2.1.0", "graceful-fs": "4.1.11", - "jest-message-util": "21.1.0", - "jest-mock": "21.1.0", - "jest-validate": "21.1.0", - "mkdirp": "0.5.1" + "jsonfile": "4.0.0", + "universalify": "0.1.1" } }, "jsonfile": { @@ -13202,126 +13445,19 @@ "graceful-fs": "4.1.11" } }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" - } - }, - "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", - "dev": true, - "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" - } - }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "2.3.0" - } - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.4.0", - "path-type": "2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "3.0.0" - } - } - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "supports-color": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", - "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", - "dev": true, - "requires": { - "has-flag": "2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, - "yargs": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", - "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", + "source-map-support": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.0.tgz", + "integrity": "sha512-vUoN3I7fHQe0R/SJLKRdKYuEdRGogsviXFkHHo17AWaTGv17VLnxw+CFXvqy+y4ORZ3doWLQcxRYfwKrsd/H7Q==", "dev": true, "requires": { - "camelcase": "4.1.0", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "read-pkg-up": "2.0.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "7.0.0" + "source-map": "0.6.1" } } } @@ -13522,6 +13658,12 @@ "integrity": "sha1-7Mo6A+VrmvFzhbqsgSrIO5lKli8=", "dev": true }, + "underscore": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz", + "integrity": "sha1-YaajIBBiKvoHljvzJSA88SI51gQ=", + "dev": true + }, "union-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", @@ -13975,10 +14117,14 @@ } }, "watch": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/watch/-/watch-0.10.0.tgz", - "integrity": "sha1-d3mLLaD5kQ1ZXxrOWwwiWFIfIdw=", - "dev": true + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/watch/-/watch-0.18.0.tgz", + "integrity": "sha1-KAlUdsbffJDJYxOJkMClQj60uYY=", + "dev": true, + "requires": { + "exec-sh": "0.2.1", + "minimist": "1.2.0" + } }, "watchpack": { "version": "1.4.0", @@ -14456,30 +14602,36 @@ "dev": true }, "yargs": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", - "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-9.0.1.tgz", + "integrity": "sha1-UqzCP+7Kw0BCB47njAwAf1CF20w=", "dev": true, "requires": { - "camelcase": "3.0.0", + "camelcase": "4.1.0", "cliui": "3.2.0", "decamelize": "1.2.0", "get-caller-file": "1.0.2", - "os-locale": "1.4.0", - "read-pkg-up": "1.0.1", + "os-locale": "2.1.0", + "read-pkg-up": "2.0.0", "require-directory": "2.1.1", "require-main-filename": "1.0.1", "set-blocking": "2.0.0", - "string-width": "1.0.2", - "which-module": "1.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", "y18n": "3.2.1", - "yargs-parser": "4.2.1" + "yargs-parser": "7.0.0" }, "dependencies": { - "camelcase": { + "ansi-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", "dev": true }, "cliui": { @@ -14491,16 +14643,112 @@ "string-width": "1.0.2", "strip-ansi": "3.0.1", "wrap-ansi": "2.1.0" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + } } }, - "yargs-parser": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", - "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { - "camelcase": "3.0.0" + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" + } + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" + } + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "2.3.0" + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "2.0.0", + "normalize-package-data": "2.4.0", + "path-type": "2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "2.1.0", + "read-pkg": "2.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true } } }, diff --git a/package.json b/package.json index 6e57dac5dc4..8ed06f9bc13 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@types/bignumber.js": "^4.0.2", "@types/classnames": "^2.2.3", "@types/history": "^4.6.0", - "@types/jest": "^21.1.0", + "@types/jest": "^21.1.4", "@types/lodash": "^4.14.74", "@types/moment": "^2.13.0", "@types/prop-types": "^15.5.1", @@ -72,7 +72,9 @@ "copy-webpack-plugin": "^4.0.1", "css-loader": "^0.28.7", "empty": "^0.10.1", - "enzyme": "^2.8.0", + "enzyme": "^3.1.0", + "enzyme-adapter-react-16": "^1.0.2", + "enzyme-to-json": "^3.1.4", "express": "^4.15.4", "extract-text-webpack-plugin": "^3.0.0", "file-loader": "^0.11.0", @@ -81,7 +83,7 @@ "html-webpack-plugin": "^2.30.1", "husky": "^0.14.3", "image-webpack-loader": "^3.4.2", - "jest": "^19.0.2", + "jest": "^21.2.1", "less": "^2.7.2", "less-loader": "^4.0.3", "lint-staged": "^4.2.2", @@ -92,12 +94,14 @@ "prettier": "^1.7.0", "progress": "^2.0.0", "react-hot-loader": "^3.0.0-beta.6", + "react-test-renderer": "^16.0.0", "redux-devtools-extension": "^2.13.0", + "redux-test-utils": "^0.1.3", "resolve-url-loader": "^2.0.0", "rimraf": "^2.6.2", "sass-loader": "^6.0.2", "style-loader": "^0.18.2", - "ts-jest": "^21.0.1", + "ts-jest": "^21.1.3", "tslint": "^5.7.0", "tslint-config-prettier": "^1.5.0", "tslint-react": "^3.2.0", diff --git a/spec/libs/contract.spec.ts b/spec/libs/contract.spec.ts index ff2c51aded7..827490ac35f 100644 --- a/spec/libs/contract.spec.ts +++ b/spec/libs/contract.spec.ts @@ -1,5 +1,4 @@ import Contract from 'libs/contract'; -import Big from 'bignumber.js'; describe('Contract', () => { // From the ABI docs @@ -7,16 +6,16 @@ describe('Contract', () => { const testAbi = [ { type: 'event', + name: 'Event', inputs: [ { name: 'a', type: 'uint256', indexed: true }, { name: 'b', type: 'bytes32', indexed: false } - ], - name: 'Event' + ] }, { type: 'function', - inputs: [{ name: 'a', type: 'uint256' }], name: 'foo', + inputs: [{ name: 'a', type: 'uint256' }], outputs: [] } ]; diff --git a/spec/libs/decrypt.spec.ts b/spec/libs/decrypt.spec.ts index 8135a364c6c..670e4f9acfa 100644 --- a/spec/libs/decrypt.spec.ts +++ b/spec/libs/decrypt.spec.ts @@ -6,50 +6,52 @@ import { decryptMnemonicToPrivKey } from '../../common/libs/decrypt'; -//deconstructed elements of a V1 encrypted priv key -const encpkey = - 'U2FsdGVkX19us8qXfYyeQhxyzV7aFlXckG/KrRLajoCGBKO4/saefxGs/3PrCLWxZEbx2vn6V0VDWrkDUkL+8S4MK7FL9LCiIKxeCq/ciwX9YQepsRRetG2MExuUWkQ6365d'; -const pass = 'testtesttest'; -const salt = 'brPKl32MnkI='; -const ciphertext = - 'HHLNXtoWVdyQb8qtEtqOgIYEo7j+xp5/Eaz/c+sItbFkRvHa+fpXRUNauQNSQv7xLgwrsUv0sKIgrF4Kr9yLBf1hB6mxFF60bYwTG5RaRDrfrl0='; -const iv = 'k9YWF8ZBCoyuFS6CfGS+7w=='; -const key = 'u9uhwRmBQDJ12MUBkIrO5EzMQZTYEf6hTBDzSJBKJ2k='; -const pkey = 'a56d4f23449a10ddcdd94bad56f895640097800406840aa8fe545d324d422c02'; +// Elements of a V1 encrypted priv key +const v1 = { + encpkey: + 'U2FsdGVkX19us8qXfYyeQhxyzV7aFlXckG/KrRLajoCGBKO4/saefxGs/3PrCLWxZEbx2vn6V0VDWrkDUkL+8S4MK7FL9LCiIKxeCq/ciwX9YQepsRRetG2MExuUWkQ6365d', + pass: 'testtesttest', + salt: 'brPKl32MnkI=', + ciphertext: + 'HHLNXtoWVdyQb8qtEtqOgIYEo7j+xp5/Eaz/c+sItbFkRvHa+fpXRUNauQNSQv7xLgwrsUv0sKIgrF4Kr9yLBf1hB6mxFF60bYwTG5RaRDrfrl0=', + iv: 'k9YWF8ZBCoyuFS6CfGS+7w==', + key: 'u9uhwRmBQDJ12MUBkIrO5EzMQZTYEf6hTBDzSJBKJ2k=', + pkey: 'a56d4f23449a10ddcdd94bad56f895640097800406840aa8fe545d324d422c02' +}; describe('decryptPrivKey', () => { it('should decrypt encrypted pkey string to pkey buffer', () => { - const decrypt = decryptPrivKey(encpkey, pass); + const decrypt = decryptPrivKey(v1.encpkey, v1.pass); expect(decrypt).toBeInstanceOf(Buffer); - expect(decrypt.toString('hex')).toEqual(pkey); + expect(decrypt.toString('hex')).toEqual(v1.pkey); expect(decrypt.length).toEqual(32); }); }); describe('decodeCryptojsSalt', () => { it('should derive correct salt and ciphertext from pkey string', () => { - const decode = decodeCryptojsSalt(encpkey); + const decode = decodeCryptojsSalt(v1.encpkey); expect(decode.salt).toBeInstanceOf(Buffer); expect(decode.ciphertext).toBeInstanceOf(Buffer); - expect(decode.salt.toString('base64')).toEqual(salt); - expect(decode.ciphertext.toString('base64')).toEqual(ciphertext); + expect(decode.salt.toString('base64')).toEqual(v1.salt); + expect(decode.ciphertext.toString('base64')).toEqual(v1.ciphertext); }); }); describe('evp_kdf', () => { it('should derive correct key and iv', () => { const result = evp_kdf( - new Buffer(pass, 'utf8'), - new Buffer(salt, 'base64'), + new Buffer(v1.pass, 'utf8'), + new Buffer(v1.salt, 'base64'), { keysize: 32, ivsize: 16 } ); expect(result.key).toBeInstanceOf(Buffer); expect(result.iv).toBeInstanceOf(Buffer); - expect(result.key.toString('base64')).toEqual(key); - expect(result.iv.toString('base64')).toEqual(iv); + expect(result.key.toString('base64')).toEqual(v1.key); + expect(result.iv.toString('base64')).toEqual(v1.iv); }); }); diff --git a/spec/libs/erc20.spec.ts b/spec/libs/erc20.spec.ts index 18c57e5f79c..53aa4a78af5 100644 --- a/spec/libs/erc20.spec.ts +++ b/spec/libs/erc20.spec.ts @@ -1,6 +1,5 @@ import Big from 'bignumber.js'; import ERC20 from 'libs/erc20'; -import abi from 'ethereumjs-abi'; const MEW_ADDRESS = '0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8'; describe('ERC20', () => { diff --git a/spec/libs/units.spec.ts b/spec/libs/units.spec.ts index e7c62b548eb..d6b068b78d7 100644 --- a/spec/libs/units.spec.ts +++ b/spec/libs/units.spec.ts @@ -1,17 +1,17 @@ import Big from 'bignumber.js'; -import { toWei, toUnit } from '../../common/libs/units'; +import { toWei, toUnit, UnitKey } from '../../common/libs/units'; describe('Units', () => { describe('toWei', () => { const conversions = [ { value: '0.001371', - unit: 'ether', + unit: 'ether' as UnitKey, wei: '1371000000000000' }, { value: '9', - unit: 'gwei', + unit: 'gwei' as UnitKey, wei: '9000000000' } ]; @@ -28,14 +28,14 @@ describe('Units', () => { const conversions = [ { value: '.41849', - fromUnit: 'ether', - toUnit: 'gwei', + fromUnit: 'ether' as UnitKey, + toUnit: 'gwei' as UnitKey, output: '418490000' }, { value: '4924.71', - fromUnit: 'nanoether', - toUnit: 'szabo', + fromUnit: 'nanoether' as UnitKey, + toUnit: 'szabo' as UnitKey, output: '4.92471' } ]; diff --git a/spec/pages/ENS.spec.tsx b/spec/pages/ENS.spec.tsx new file mode 100644 index 00000000000..8b8ef033b89 --- /dev/null +++ b/spec/pages/ENS.spec.tsx @@ -0,0 +1,16 @@ +import React from 'react'; +import Enzyme from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; +import ENS from 'containers/Tabs/ENS'; +import shallowWithStore from '../utils/shallowWithStore'; +import { createMockStore } from 'redux-test-utils'; + +Enzyme.configure({ adapter: new Adapter() }); + +it('render snapshot', () => { + const testState = {}; + const store = createMockStore(testState); + const component = shallowWithStore(, store); + + expect(component).toMatchSnapshot(); +}); diff --git a/spec/pages/GenerateWallet.spec.tsx b/spec/pages/GenerateWallet.spec.tsx new file mode 100644 index 00000000000..d47e41ee35a --- /dev/null +++ b/spec/pages/GenerateWallet.spec.tsx @@ -0,0 +1,25 @@ +import React from 'react'; +import Enzyme from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; +import GenerateWallet from 'containers/Tabs/GenerateWallet'; +import shallowWithStore from '../utils/shallowWithStore'; +import { createMockStore } from 'redux-test-utils'; + +Enzyme.configure({ adapter: new Adapter() }); + +it('render snapshot', () => { + const testState = { + form: { + walletPasswordForm: {} + }, + generateWallet: { + activeStep: {}, + password: {}, + wallet: {} + } + }; + const store = createMockStore(testState); + const component = shallowWithStore(, store); + + expect(component).toMatchSnapshot(); +}); diff --git a/spec/pages/SendTransaction.spec.tsx b/spec/pages/SendTransaction.spec.tsx new file mode 100644 index 00000000000..af5de171b04 --- /dev/null +++ b/spec/pages/SendTransaction.spec.tsx @@ -0,0 +1,44 @@ +import React from 'react'; +import Enzyme from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; +import SendTransaction from 'containers/Tabs/SendTransaction'; +import shallowWithStore from '../utils/shallowWithStore'; +import { createMockStore } from 'redux-test-utils'; + +Enzyme.configure({ adapter: new Adapter() }); + +it('render snapshot', () => { + const testStateConfig = { + languageSelection: 'en', + nodeSelection: 'rop_mew', + gasPriceGwei: 21, + offline: false, + forceOffline: false + }; + const testState = { + wallet: {}, + balance: {}, + tokenBalances: {}, + node: {}, + nodeLib: {}, + network: {}, + tokens: [], + gasPrice: {}, + transactions: {}, + offline: {}, + forceOffline: {}, + config: testStateConfig, + customTokens: [] + }; + const location = { + search: + '?to=73640ebefe93e4d0d6e9030ee9c1866ad1f3b9f1feeb403e978c4952d8369b39' + }; + const store = createMockStore(testState); + const component = shallowWithStore( + , + store + ); + + expect(component).toMatchSnapshot(); +}); diff --git a/spec/pages/Swap.spec.tsx b/spec/pages/Swap.spec.tsx new file mode 100644 index 00000000000..10d9452bf71 --- /dev/null +++ b/spec/pages/Swap.spec.tsx @@ -0,0 +1,35 @@ +import React from 'react'; +import Enzyme from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; +import Swap from 'containers/Tabs/Swap'; +import shallowWithStore from '../utils/shallowWithStore'; +import { createMockStore } from 'redux-test-utils'; + +Enzyme.configure({ adapter: new Adapter() }); + +it('render snapshot', () => { + const testState = { + swap: { + originAmount: {}, + destinationAmount: {}, + originKind: {}, + destinationKind: {}, + destinationKindOptions: {}, + originKindOptions: {}, + step: {}, + bityRates: {}, + bityOrder: {}, + destinationAddress: {}, + isFetchingRates: {}, + secondsRemaining: {}, + outputTx: {}, + isPostingOrder: {}, + orderStatus: {}, + paymentAddress: {} + } + }; + const store = createMockStore(testState); + const component = shallowWithStore(, store); + + expect(component).toMatchSnapshot(); +}); diff --git a/spec/pages/ViewWallet.spec.tsx b/spec/pages/ViewWallet.spec.tsx new file mode 100644 index 00000000000..b6e5cc07dc8 --- /dev/null +++ b/spec/pages/ViewWallet.spec.tsx @@ -0,0 +1,16 @@ +import React from 'react'; +import Enzyme from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; +import ViewWallet from 'containers/Tabs/ViewWallet'; +import shallowWithStore from '../utils/shallowWithStore'; +import { createMockStore } from 'redux-test-utils'; + +Enzyme.configure({ adapter: new Adapter() }); + +it('render snapshot', () => { + const testState = {}; + const store = createMockStore(testState); + const component = shallowWithStore(, store); + + expect(component).toMatchSnapshot(); +}); diff --git a/spec/pages/__snapshots__/ENS.spec.tsx.snap b/spec/pages/__snapshots__/ENS.spec.tsx.snap new file mode 100644 index 00000000000..0d3516257e5 --- /dev/null +++ b/spec/pages/__snapshots__/ENS.spec.tsx.snap @@ -0,0 +1,7 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`render snapshot 1`] = ` + +`; diff --git a/spec/pages/__snapshots__/GenerateWallet.spec.tsx.snap b/spec/pages/__snapshots__/GenerateWallet.spec.tsx.snap new file mode 100644 index 00000000000..fdbba3e6216 --- /dev/null +++ b/spec/pages/__snapshots__/GenerateWallet.spec.tsx.snap @@ -0,0 +1,13 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`render snapshot 1`] = ` + +`; diff --git a/spec/pages/__snapshots__/SendTransaction.spec.tsx.snap b/spec/pages/__snapshots__/SendTransaction.spec.tsx.snap new file mode 100644 index 00000000000..3bd7741e5c5 --- /dev/null +++ b/spec/pages/__snapshots__/SendTransaction.spec.tsx.snap @@ -0,0 +1,77 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`render snapshot 1`] = ` + +`; diff --git a/spec/pages/__snapshots__/Swap.spec.tsx.snap b/spec/pages/__snapshots__/Swap.spec.tsx.snap new file mode 100644 index 00000000000..743a0f441d0 --- /dev/null +++ b/spec/pages/__snapshots__/Swap.spec.tsx.snap @@ -0,0 +1,37 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`render snapshot 1`] = ` + +`; diff --git a/spec/pages/__snapshots__/ViewWallet.spec.tsx.snap b/spec/pages/__snapshots__/ViewWallet.spec.tsx.snap new file mode 100644 index 00000000000..cad36045366 --- /dev/null +++ b/spec/pages/__snapshots__/ViewWallet.spec.tsx.snap @@ -0,0 +1,34 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`render snapshot 1`] = ` + +
+
+
+
+
+

+ View Wallet Info +

+
+
+

+ +

+
+
+
+
+
+
+`; diff --git a/spec/reducers/config.spec.ts b/spec/reducers/config.spec.ts index a5700e08f1b..71587cc5244 100644 --- a/spec/reducers/config.spec.ts +++ b/spec/reducers/config.spec.ts @@ -3,10 +3,6 @@ import * as configActions from 'actions/config'; import { NODES } from 'config/data'; describe('config reducer', () => { - it('should return the initial state', () => { - expect(config(undefined, {})).toEqual(INITIAL_STATE); - }); - it('should handle CONFIG_LANGUAGE_CHANGE', () => { const language = 'en'; expect(config(undefined, configActions.changeLanguage(language))).toEqual({ @@ -16,7 +12,7 @@ describe('config reducer', () => { }); it('should handle CONFIG_NODE_CHANGE', () => { - const node = NODES[0]; + const node = Object.keys(NODES)[0]; expect(config(undefined, configActions.changeNode(node))).toEqual({ ...INITIAL_STATE, diff --git a/spec/reducers/generateWallet.spec.ts b/spec/reducers/generateWallet.spec.ts index 8bd6afd75c9..66c639a64c0 100644 --- a/spec/reducers/generateWallet.spec.ts +++ b/spec/reducers/generateWallet.spec.ts @@ -2,10 +2,6 @@ import { generateWallet, INITIAL_STATE } from 'reducers/generateWallet'; import * as generateWalletActions from 'actions/generateWallet'; describe('generateWallet reducer', () => { - it('should return the initial state', () => { - expect(generateWallet(undefined, {})).toEqual(INITIAL_STATE); - }); - it('should handle GENERATE_WALLET_CONTINUE_TO_PAPER', () => { expect( generateWallet(undefined, generateWalletActions.continueToPaper()) diff --git a/spec/reducers/swap.spec.ts b/spec/reducers/swap.spec.ts index e28b24d1ec9..06a09acb3c2 100644 --- a/spec/reducers/swap.spec.ts +++ b/spec/reducers/swap.spec.ts @@ -8,10 +8,6 @@ import * as swapActions from 'actions/swap'; import without from 'lodash/without'; describe('swap reducer', () => { - it('should return the initial state', () => { - expect(swap(undefined, {})).toEqual(INITIAL_STATE); - }); - it('should handle SWAP_ORIGIN_KIND', () => { const newOriginKind = 'ETH'; const newDestinationKind = buildDestinationKind( @@ -84,7 +80,9 @@ describe('swap reducer', () => { it('should handle SWAP_LOAD_BITY_RATES_SUCCEEDED', () => { const bityRates = { BTCETH: 0.01, - ETHREP: 10 + ETHREP: 10, + ETHBTC: 0, + BTCREP: 0 }; expect( swap(undefined, swapActions.loadBityRatesSucceededSwap(bityRates)) @@ -134,14 +132,22 @@ describe('swap reducer', () => { }); it('should handle SWAP_ORDER_CREATE_REQUESTED', () => { - expect(swap(undefined, { type: 'SWAP_ORDER_CREATE_REQUESTED' })).toEqual({ + expect( + swap(undefined, { + type: 'SWAP_ORDER_CREATE_REQUESTED' + } as swapActions.SwapAction) + ).toEqual({ ...INITIAL_STATE, isPostingOrder: true }); }); it('should handle SWAP_ORDER_CREATE_FAILED', () => { - expect(swap(undefined, { type: 'SWAP_ORDER_CREATE_FAILED' })).toEqual({ + expect( + swap(undefined, { + type: 'SWAP_ORDER_CREATE_FAILED' + } as swapActions.SwapAction) + ).toEqual({ ...INITIAL_STATE, isPostingOrder: false }); @@ -166,7 +172,9 @@ describe('swap reducer', () => { it('should handle SWAP_LOAD_BITY_RATES_REQUESTED', () => { expect( - swap(undefined, { type: 'SWAP_LOAD_BITY_RATES_REQUESTED' }) + swap(undefined, { + type: 'SWAP_LOAD_BITY_RATES_REQUESTED' + } as swapActions.SwapAction) ).toEqual({ ...INITIAL_STATE, isFetchingRates: true @@ -174,7 +182,11 @@ describe('swap reducer', () => { }); it('should handle SWAP_STOP_LOAD_BITY_RATES', () => { - expect(swap(undefined, { type: 'SWAP_STOP_LOAD_BITY_RATES' })).toEqual({ + expect( + swap(undefined, { + type: 'SWAP_STOP_LOAD_BITY_RATES' + } as swapActions.SwapAction) + ).toEqual({ ...INITIAL_STATE, isFetchingRates: false }); diff --git a/spec/reducers/wallet.spec.ts b/spec/reducers/wallet.spec.ts index db00bdf57af..a17abf8b3f4 100644 --- a/spec/reducers/wallet.spec.ts +++ b/spec/reducers/wallet.spec.ts @@ -1,15 +1,18 @@ import { wallet, INITIAL_STATE } from 'reducers/wallet'; import * as walletActions from 'actions/wallet'; import Big from 'bignumber.js'; -import { Ether } from 'libs/units'; describe('wallet reducer', () => { - it('should return the initial state', () => { - expect(wallet(undefined, {})).toEqual(INITIAL_STATE); - }); - it('should handle WALLET_SET', () => { - const walletInstance = { wallet: true }; + const doSomething = new Promise(resolve => { + setTimeout(() => resolve('Success'), 1000); + }); + + const walletInstance = { + getAddress: () => doSomething, + signRawTransaction: () => doSomething + }; + expect(wallet(undefined, walletActions.setWallet(walletInstance))).toEqual({ ...INITIAL_STATE, inst: walletInstance, diff --git a/spec/utils/formatters.spec.ts b/spec/utils/formatters.spec.ts index 824390d5dfd..cabfe5a4407 100644 --- a/spec/utils/formatters.spec.ts +++ b/spec/utils/formatters.spec.ts @@ -25,15 +25,18 @@ describe('formatNumber', () => { const pairs = [ { input: new Big('0.0127491'), - output: '0.013' + output: '0.013', + digits: undefined }, { input: new Big('21.87468421'), - output: '21.875' + output: '21.875', + digits: undefined }, { input: new Big(0), - output: '0' + output: '0', + digits: undefined }, { input: new Big('354.4728173'), @@ -48,7 +51,7 @@ describe('formatNumber', () => { ]; pairs.forEach(pair => { - const digits = pair.digits === undefined ? 'default' : pair.digits; + const digits = pair.digits; it(`should convert ${pair.input.toString()} to ${pair.output} when using ${digits} digits`, () => { expect(formatNumber(pair.input, pair.digits)).toEqual(pair.output); }); diff --git a/spec/utils/localStorage.spec.ts b/spec/utils/localStorage.spec.ts index 261fa75c378..947f2db1df7 100644 --- a/spec/utils/localStorage.spec.ts +++ b/spec/utils/localStorage.spec.ts @@ -1,4 +1,3 @@ -import LocalStorageMock from '../mocks/localStorage'; import { loadState, saveState, @@ -6,15 +5,15 @@ import { REDUX_STATE } from '../../common/utils/localStorage'; -window.localStorage = new LocalStorageMock(); - describe('saveState', () => { it('should serialize and persist state to local storage under key: "REDUX_STATE"', () => { const persistMe = { foo: 'bar' }; saveState(persistMe); - expect(JSON.parse(localStorage.getItem(REDUX_STATE))).toEqual(persistMe); + expect(JSON.parse(localStorage.getItem(REDUX_STATE) as string)).toEqual( + persistMe + ); }); }); diff --git a/spec/utils/shallowWithStore.ts b/spec/utils/shallowWithStore.ts new file mode 100644 index 00000000000..b0a07f746aa --- /dev/null +++ b/spec/utils/shallowWithStore.ts @@ -0,0 +1,10 @@ +import { shallow } from 'enzyme'; + +const shallowWithStore = (component, store) => { + const context = { + store + }; + return shallow(component, { context }); +}; + +export default shallowWithStore; diff --git a/tsconfig.json b/tsconfig.json index f3c77572119..1a2d9c663c0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,6 +17,7 @@ }, "include": [ "./common/", + "spec", "./node_modules/types-rlp/index.d.ts", "./node_modules/types-bn/index.d.ts" ],