diff --git a/.gitignore b/.gitignore index a7eb01438..6b3794e52 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ test.sh dist/flavor\.min\.css dist/flavor\.css + +test_old/ diff --git a/package-lock.json b/package-lock.json index 1f859f49d..a0f21e80e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,44 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@babel/code-frame": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.51.tgz", + "integrity": "sha1-vXHZsZKvl435FYKdOdQJRFZDmgw=", + "dev": true, + "requires": { + "@babel/highlight": "7.0.0-beta.51" + } + }, + "@babel/highlight": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.51.tgz", + "integrity": "sha1-6IRK4loVlcz9QriWI7Q3bKBtIl0=", + "dev": true, + "requires": { + "chalk": "2.4.1", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "@comandeer/babel-plugin-banner": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@comandeer/babel-plugin-banner/-/babel-plugin-banner-1.0.0.tgz", + "integrity": "sha1-QLzOC77ghLWwJUWjNjXQU8JINW8=", + "dev": true + }, + "@types/estree": { + "version": "0.0.38", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.38.tgz", + "integrity": "sha512-F/v7t1LwS4vnXuPooJQGBRKRGIoxWUTmA4VHfqjOccFsNDThD5bfUNpITive6s352O7o384wcpEaDV8rHCehDA==", + "dev": true + }, + "@types/node": { + "version": "10.3.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.3.3.tgz", + "integrity": "sha512-/gwCgiI2e9RzzZTKbl+am3vgNqOt7a9fJ/uxv4SqYKxenoEDNVU3KZEadlpusWhQI0A0dOrZ0T68JYKVjzmgdQ==", + "dev": true + }, "abab": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz", @@ -31,12 +69,64 @@ "acorn": "5.5.3" } }, + "acorn-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "dev": true, + "requires": { + "acorn": "3.3.0" + }, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + } + } + }, + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" + } + }, + "ajv-keywords": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", + "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", + "dev": true + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + } + }, "amdefine": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", "dev": true }, + "ansi-escapes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", + "dev": true + }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -49,6 +139,54 @@ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "dev": true }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "3.1.10", + "normalize-path": "2.1.1" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } + } + } + }, + "append-transform": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", + "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", + "dev": true, + "requires": { + "default-require-extensions": "2.0.0" + } + }, "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", @@ -74,6 +212,24 @@ "sprintf-js": "1.0.3" } }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, "array-equal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", @@ -86,6 +242,49 @@ "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", "dev": true }, + "array-includes": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", + "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "dev": true, + "requires": { + "define-properties": "1.1.2", + "es-abstract": "1.11.0" + } + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "1.0.3" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "dev": true + }, "asn1": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", @@ -98,6 +297,35 @@ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "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.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "4.17.10" + }, + "dependencies": { + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + } + } + }, "async-foreach": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", @@ -116,6 +344,12 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, + "atob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", + "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=", + "dev": true + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -190,6 +424,60 @@ } } }, + "babel-core": { + "version": "6.26.3", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-generator": "6.26.1", + "babel-helpers": "6.24.1", + "babel-messages": "6.23.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "convert-source-map": "1.5.1", + "debug": "2.6.9", + "json5": "0.5.1", + "lodash": "4.17.4", + "minimatch": "3.0.4", + "path-is-absolute": "1.0.1", + "private": "0.1.8", + "slash": "1.0.0", + "source-map": "0.5.7" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "dev": true, + "requires": { + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.4", + "source-map": "0.5.7", + "trim-right": "1.0.1" + } + }, "babel-helper-builder-binary-assignment-operator-visitor": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", @@ -225,6 +513,12 @@ "lodash": "4.17.4" } }, + "babel-helper-evaluate-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-helper-evaluate-path/-/babel-helper-evaluate-path-0.3.0.tgz", + "integrity": "sha512-dRFlMTqUJRGzx5a2smKxmptDdNCXKSkPcXWzKLwAV72hvIZumrd/0z9RcewHkr7PmAEq+ETtpD1GK6wZ6ZUXzw==", + "dev": true + }, "babel-helper-explode-assignable-expression": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", @@ -236,6 +530,12 @@ "babel-types": "6.26.0" } }, + "babel-helper-flip-expressions": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-helper-flip-expressions/-/babel-helper-flip-expressions-0.3.0.tgz", + "integrity": "sha512-kNGohWmtAG3b7tN1xocRQ5rsKkH/hpvZsMiGOJ1VwGJKhnwzR5KlB3rvKBaBPl5/IGHcopB2JN+r1SUEX1iMAw==", + "dev": true + }, "babel-helper-function-name": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", @@ -269,6 +569,24 @@ "babel-types": "6.26.0" } }, + "babel-helper-is-nodes-equiv": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/babel-helper-is-nodes-equiv/-/babel-helper-is-nodes-equiv-0.0.1.tgz", + "integrity": "sha1-NOmzALFHnd2Y7HfqC76TQt/jloQ=", + "dev": true + }, + "babel-helper-is-void-0": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-helper-is-void-0/-/babel-helper-is-void-0-0.3.0.tgz", + "integrity": "sha512-JVqdX8y7Rf/x4NwbqtUI7mdQjL9HWoDnoAEQ8Gv8oxzjvbJv+n75f7l36m9Y8C7sCUltX3V5edndrp7Hp1oSXQ==", + "dev": true + }, + "babel-helper-mark-eval-scopes": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-helper-mark-eval-scopes/-/babel-helper-mark-eval-scopes-0.3.0.tgz", + "integrity": "sha512-nrho5Dg4vl0VUgURVpGpEGiwbst5JX7efIyDHFxmkCx/ocQFnrPt8ze9Kxl6TKjR29bJ7D/XKY1NMlSxOQJRbQ==", + "dev": true + }, "babel-helper-optimise-call-expression": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", @@ -303,6 +621,12 @@ "babel-types": "6.26.0" } }, + "babel-helper-remove-or-void": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-helper-remove-or-void/-/babel-helper-remove-or-void-0.3.0.tgz", + "integrity": "sha512-D68W1M3ibCcbg0ysh3ww4/O0g10X1CXK720oOuR8kpfY7w0yP4tVcpK7zDmI1JecynycTQYAZ1rhLJo9aVtIKQ==", + "dev": true + }, "babel-helper-replace-supers": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", @@ -317,6 +641,32 @@ "babel-types": "6.26.0" } }, + "babel-helper-to-multiple-sequence-expressions": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.3.0.tgz", + "integrity": "sha512-1uCrBD+EAaMnAYh7hc944n8Ga19y3daEnoXWPYDvFVsxMCc1l8aDjksApaCEaNSSuewq8BEcff47Cy1PbLg2Gw==", + "dev": true + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } + }, + "babel-jest": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-23.0.1.tgz", + "integrity": "sha1-u6079SP7IC2gXtCmVAtIyE7tE6Y=", + "dev": true, + "requires": { + "babel-plugin-istanbul": "4.1.6", + "babel-preset-jest": "23.0.1" + } + }, "babel-messages": { "version": "6.23.0", "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", @@ -335,6 +685,130 @@ "babel-runtime": "6.26.0" } }, + "babel-plugin-istanbul": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz", + "integrity": "sha512-PWP9FQ1AhZhS01T/4qLSKoHGY/xvkZdVBGlKM/HuxxS3+sC66HhTNR7+MpbO/so/cz/wY94MeSWJuP1hXIPfwQ==", + "dev": true, + "requires": { + "babel-plugin-syntax-object-rest-spread": "6.13.0", + "find-up": "2.1.0", + "istanbul-lib-instrument": "1.10.1", + "test-exclude": "4.2.1" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + } + } + }, + "babel-plugin-jest-hoist": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.0.1.tgz", + "integrity": "sha1-6qEclkVjrqnCG+zvK994U/fzwUg=", + "dev": true + }, + "babel-plugin-minify-builtins": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.3.0.tgz", + "integrity": "sha512-MqhSHlxkmgURqj3144qPksbZ/qof1JWdumcbucc4tysFcf3P3V3z3munTevQgKEFNMd8F5/ECGnwb63xogLjAg==", + "dev": true, + "requires": { + "babel-helper-evaluate-path": "0.3.0" + } + }, + "babel-plugin-minify-constant-folding": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-constant-folding/-/babel-plugin-minify-constant-folding-0.3.0.tgz", + "integrity": "sha512-1XeRpx+aY1BuNY6QU/cm6P+FtEi3ar3XceYbmC+4q4W+2Ewq5pL7V68oHg1hKXkBIE0Z4/FjSoHz6vosZLOe/A==", + "dev": true, + "requires": { + "babel-helper-evaluate-path": "0.3.0" + } + }, + "babel-plugin-minify-dead-code-elimination": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.3.0.tgz", + "integrity": "sha512-SjM2Fzg85YZz+q/PNJ/HU4O3W98FKFOiP9K5z3sfonlamGOzvZw3Eup2OTiEBsbbqTeY8yzNCAv3qpJRYCgGmw==", + "dev": true, + "requires": { + "babel-helper-evaluate-path": "0.3.0", + "babel-helper-mark-eval-scopes": "0.3.0", + "babel-helper-remove-or-void": "0.3.0", + "lodash.some": "4.6.0" + } + }, + "babel-plugin-minify-flip-comparisons": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-flip-comparisons/-/babel-plugin-minify-flip-comparisons-0.3.0.tgz", + "integrity": "sha512-B8lK+ekcpSNVH7PZpWDe5nC5zxjRiiT4nTsa6h3QkF3Kk6y9qooIFLemdGlqBq6j0zALEnebvCpw8v7gAdpgnw==", + "dev": true, + "requires": { + "babel-helper-is-void-0": "0.3.0" + } + }, + "babel-plugin-minify-guarded-expressions": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-guarded-expressions/-/babel-plugin-minify-guarded-expressions-0.3.0.tgz", + "integrity": "sha512-O+6CvF5/Ttsth3LMg4/BhyvVZ82GImeKMXGdVRQGK/8jFiP15EjRpdgFlxv3cnqRjqdYxLCS6r28VfLpb9C/kA==", + "dev": true, + "requires": { + "babel-helper-flip-expressions": "0.3.0" + } + }, + "babel-plugin-minify-infinity": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-infinity/-/babel-plugin-minify-infinity-0.3.0.tgz", + "integrity": "sha512-Sj8ia3/w9158DWieUxU6/VvnYVy59geeFEkVgLZYBE8EBP+sN48tHtBM/jSgz0ejEdBlcfqJ6TnvPmVXTzR2BQ==", + "dev": true + }, + "babel-plugin-minify-mangle-names": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-mangle-names/-/babel-plugin-minify-mangle-names-0.3.0.tgz", + "integrity": "sha512-PYTonhFWURsfAN8achDwvR5Xgy6EeTClLz+fSgGRqjAIXb0OyFm3/xfccbQviVi1qDXmlSnt6oJhBg8KE4Fn7Q==", + "dev": true, + "requires": { + "babel-helper-mark-eval-scopes": "0.3.0" + } + }, + "babel-plugin-minify-numeric-literals": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-numeric-literals/-/babel-plugin-minify-numeric-literals-0.3.0.tgz", + "integrity": "sha512-TgZj6ay8zDw74AS3yiIfoQ8vRSNJisYO/Du60S8nPV7EW7JM6fDMx5Sar6yVHlVuuwNgvDUBh191K33bVrAhpg==", + "dev": true + }, + "babel-plugin-minify-replace": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.3.0.tgz", + "integrity": "sha512-VR6tTg2Lt0TicHIOw04fsUtpPw7RaRP8PC8YzSFwEixnzvguZjZJoL7TgG7ZyEWQD1cJ96UezswECmFNa815bg==", + "dev": true + }, + "babel-plugin-minify-simplify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-simplify/-/babel-plugin-minify-simplify-0.3.0.tgz", + "integrity": "sha512-2M16ytQOCqBi7bYMu4DCWn8e6KyFCA108F6+tVrBJxOmm5u2sOmTFEa8s94tR9RHRRNYmcUf+rgidfnzL3ik9Q==", + "dev": true, + "requires": { + "babel-helper-flip-expressions": "0.3.0", + "babel-helper-is-nodes-equiv": "0.0.1", + "babel-helper-to-multiple-sequence-expressions": "0.3.0" + } + }, + "babel-plugin-minify-type-constructors": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-type-constructors/-/babel-plugin-minify-type-constructors-0.3.0.tgz", + "integrity": "sha512-XRXpvsUCPeVw9YEUw+9vSiugcSZfow81oIJT0yR9s8H4W7yJ6FHbImi5DJHoL8KcDUjYnL9wYASXk/fOkbyR6Q==", + "dev": true, + "requires": { + "babel-helper-is-void-0": "0.3.0" + } + }, "babel-plugin-syntax-async-functions": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", @@ -347,6 +821,12 @@ "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", "dev": true }, + "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-syntax-trailing-function-commas": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", @@ -609,6 +1089,39 @@ "babel-runtime": "6.26.0" } }, + "babel-plugin-transform-inline-consecutive-adds": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.3.0.tgz", + "integrity": "sha512-iZsYAIjYLLfLK0yN5WVT7Xf7Y3wQ9Z75j9A8q/0IglQSpUt2ppTdHlwl/GeaXnxdaSmsxBu861klbTBbv2n+RA==", + "dev": true + }, + "babel-plugin-transform-member-expression-literals": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-member-expression-literals/-/babel-plugin-transform-member-expression-literals-6.9.4.tgz", + "integrity": "sha1-NwOcmgwzE6OUlfqsL/OmtbnQOL8=", + "dev": true + }, + "babel-plugin-transform-merge-sibling-variables": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-merge-sibling-variables/-/babel-plugin-transform-merge-sibling-variables-6.9.4.tgz", + "integrity": "sha1-hbQi/DN3tEnJ0c3kQIcgNTJAHa4=", + "dev": true + }, + "babel-plugin-transform-minify-booleans": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.9.4.tgz", + "integrity": "sha1-rLs+VqNVXdI5KOS1gtKFFi3SsZg=", + "dev": true + }, + "babel-plugin-transform-property-literals": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-property-literals/-/babel-plugin-transform-property-literals-6.9.4.tgz", + "integrity": "sha1-mMHSHiVXNlc/k+zlRFn2ziSYXTk=", + "dev": true, + "requires": { + "esutils": "2.0.2" + } + }, "babel-plugin-transform-regenerator": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", @@ -618,6 +1131,39 @@ "regenerator-transform": "0.10.1" } }, + "babel-plugin-transform-regexp-constructors": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-regexp-constructors/-/babel-plugin-transform-regexp-constructors-0.3.0.tgz", + "integrity": "sha512-h92YHzyl042rb0naKO8frTHntpRFwRgKkfWD8602kFHoQingjJNtbvZzvxqHncJ6XmKVyYvfrBpDOSkCTDIIxw==", + "dev": true + }, + "babel-plugin-transform-remove-console": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.9.4.tgz", + "integrity": "sha1-uYA2DAZzhOJLNXpYjYB9PINSd4A=", + "dev": true + }, + "babel-plugin-transform-remove-debugger": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-debugger/-/babel-plugin-transform-remove-debugger-6.9.4.tgz", + "integrity": "sha1-QrcnYxyXl44estGZp67IShgznvI=", + "dev": true + }, + "babel-plugin-transform-remove-undefined": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-undefined/-/babel-plugin-transform-remove-undefined-0.3.0.tgz", + "integrity": "sha512-TYGQucc8iP3LJwN3kDZLEz5aa/2KuFrqpT+s8f8NnHsBU1sAgR3y8Opns0xhC+smyDYWscqFCKM1gbkWQOhhnw==", + "dev": true, + "requires": { + "babel-helper-evaluate-path": "0.3.0" + } + }, + "babel-plugin-transform-simplify-comparison-operators": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.9.4.tgz", + "integrity": "sha1-9ir+CWyrDh9ootdT/fKDiIRxzrk=", + "dev": true + }, "babel-plugin-transform-strict-mode": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", @@ -628,6 +1174,12 @@ "babel-types": "6.26.0" } }, + "babel-plugin-transform-undefined-to-void": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-undefined-to-void/-/babel-plugin-transform-undefined-to-void-6.9.4.tgz", + "integrity": "sha1-viQcqBQEAwZ4t0hxcyK4nQyP4oA=", + "dev": true + }, "babel-preset-env": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.6.1.tgz", @@ -666,6 +1218,62 @@ "semver": "5.4.1" } }, + "babel-preset-jest": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-23.0.1.tgz", + "integrity": "sha1-YxzFRcbPAhlDATvK8i9F2H/mIZg=", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "23.0.1", + "babel-plugin-syntax-object-rest-spread": "6.13.0" + } + }, + "babel-preset-minify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-preset-minify/-/babel-preset-minify-0.3.0.tgz", + "integrity": "sha512-+VV2GWEyak3eDOmzT1DDMuqHrw3VbE9nBNkx2LLVs4pH/Me32ND8DRpVDd8IRvk1xX5p75nygyRPtkMh6GIAbQ==", + "dev": true, + "requires": { + "babel-plugin-minify-builtins": "0.3.0", + "babel-plugin-minify-constant-folding": "0.3.0", + "babel-plugin-minify-dead-code-elimination": "0.3.0", + "babel-plugin-minify-flip-comparisons": "0.3.0", + "babel-plugin-minify-guarded-expressions": "0.3.0", + "babel-plugin-minify-infinity": "0.3.0", + "babel-plugin-minify-mangle-names": "0.3.0", + "babel-plugin-minify-numeric-literals": "0.3.0", + "babel-plugin-minify-replace": "0.3.0", + "babel-plugin-minify-simplify": "0.3.0", + "babel-plugin-minify-type-constructors": "0.3.0", + "babel-plugin-transform-inline-consecutive-adds": "0.3.0", + "babel-plugin-transform-member-expression-literals": "6.9.4", + "babel-plugin-transform-merge-sibling-variables": "6.9.4", + "babel-plugin-transform-minify-booleans": "6.9.4", + "babel-plugin-transform-property-literals": "6.9.4", + "babel-plugin-transform-regexp-constructors": "0.3.0", + "babel-plugin-transform-remove-console": "6.9.4", + "babel-plugin-transform-remove-debugger": "6.9.4", + "babel-plugin-transform-remove-undefined": "0.3.0", + "babel-plugin-transform-simplify-comparison-operators": "6.9.4", + "babel-plugin-transform-undefined-to-void": "6.9.4", + "lodash.isplainobject": "4.0.6" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true, + "requires": { + "babel-core": "6.26.3", + "babel-runtime": "6.26.0", + "core-js": "2.5.3", + "home-or-tmp": "2.0.0", + "lodash": "4.17.4", + "mkdirp": "0.5.1", + "source-map-support": "0.4.18" + } + }, "babel-runtime": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", @@ -747,6 +1355,67 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "1.0.1", + "class-utils": "0.3.6", + "component-emitter": "1.2.1", + "define-property": "1.0.0", + "isobject": "3.0.1", + "mixin-deep": "1.3.1", + "pascalcase": "0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, "bcrypt-pbkdf": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", @@ -785,12 +1454,58 @@ "concat-map": "0.0.1" } }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, "browser-process-hrtime": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz", "integrity": "sha1-Ql1opY00R/AqBKqJQYf86K+Le44=", "dev": true }, + "browser-resolve": { + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz", + "integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=", + "dev": true, + "requires": { + "resolve": "1.1.7" + }, + "dependencies": { + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + } + } + }, "browserslist": { "version": "2.10.1", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.10.1.tgz", @@ -801,12 +1516,67 @@ "electron-to-chromium": "1.3.30" } }, + "bser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.0.0.tgz", + "integrity": "sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk=", + "dev": true, + "requires": { + "node-int64": "0.4.0" + } + }, + "buffer-from": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", + "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", + "dev": true + }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", "dev": true }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "1.0.0", + "component-emitter": "1.2.1", + "get-value": "2.0.6", + "has-value": "1.0.0", + "isobject": "3.0.1", + "set-value": "2.0.0", + "to-object-path": "0.3.0", + "union-value": "1.0.0", + "unset-value": "1.0.0" + } + }, + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "dev": true, + "requires": { + "callsites": "0.2.0" + }, + "dependencies": { + "callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true + } + } + }, + "callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true + }, "camel-case": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", @@ -839,12 +1609,32 @@ "integrity": "sha1-EpztdOmhKApEGIC2zSvOMO9Z5sA=", "dev": true }, + "capture-exit": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-1.2.0.tgz", + "integrity": "sha1-HF/MSJ/QqwDU8ax64QcuMXP7q28=", + "dev": true, + "requires": { + "rsvp": "3.6.2" + } + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, "chalk": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", @@ -876,6 +1666,47 @@ } } }, + "chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "dev": true + }, + "ci-info": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.3.tgz", + "integrity": "sha512-SK/846h/Rcy8q9Z9CAwGBLfCJ6EkjJWdpelWDufQpqVDYq2Wnnv8zlSO6AMQap02jvhVruKKpEtQOufo3pFhLg==", + "dev": true + }, + "circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "dev": true + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + } + } + }, "clean-css": { "version": "4.1.11", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.11.tgz", @@ -885,6 +1716,21 @@ "source-map": "0.5.7" } }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, "clipboard": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.1.tgz", @@ -942,6 +1788,16 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "1.0.0", + "object-visit": "1.0.1" + } + }, "color-convert": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", @@ -972,18 +1828,60 @@ "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, + "compare-versions": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.3.0.tgz", + "integrity": "sha512-MAAAIOdi2s4Gl6rZ76PNcUa9IOYB+5ICdT41o5uMRf09aEu/F9RK+qhe8RjXNPwcTjGV7KU7h2P/fljThFVqyQ==", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "1.1.0", + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "typedarray": "0.0.6" + } + }, "console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "dev": true }, + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "dev": true + }, + "convert-source-map": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", + "dev": true + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, "core-js": { "version": "2.5.3", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz", @@ -1070,16 +1968,31 @@ "whatwg-url": "6.4.1" } }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "debug-log": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz", + "integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=", + "dev": true + }, "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", "dev": true }, "deep-is": { @@ -1088,6 +2001,15 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "default-require-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", + "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", + "dev": true, + "requires": { + "strip-bom": "3.0.0" + } + }, "define-properties": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", @@ -1098,11 +2020,81 @@ "object-keys": "1.0.11" } }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", - "dev": true + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "1.0.2", + "isobject": "3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "deglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/deglob/-/deglob-2.1.1.tgz", + "integrity": "sha512-2kjwuGGonL7gWE1XU4Fv79+vVzpoQCl0V+boMwWtOQJV2AGDabCwez++nB1Nli/8BabAfZQ/UuHPlp6AymKdWw==", + "dev": true, + "requires": { + "find-root": "1.1.0", + "glob": "7.1.2", + "ignore": "3.3.8", + "pkg-config": "1.1.1", + "run-parallel": "1.1.9", + "uniq": "1.0.1" + } + }, + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, + "requires": { + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.1", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.6.2" + } }, "delayed-stream": { "version": "1.0.0", @@ -1123,6 +2115,42 @@ "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "dev": true }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "2.0.1" + } + }, + "detect-newline": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", + "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "2.0.2" + } + }, "domexception": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz", @@ -1132,12 +2160,6 @@ "webidl-conversions": "4.0.2" } }, - "duplexer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", - "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", - "dev": true - }, "ecc-jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", @@ -1163,6 +2185,15 @@ "electron-releases": "2.1.0" } }, + "encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "dev": true, + "requires": { + "iconv-lite": "0.4.19" + } + }, "entities": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", @@ -1236,6 +2267,318 @@ } } }, + "eslint": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.18.2.tgz", + "integrity": "sha512-qy4i3wODqKMYfz9LUI8N2qYDkHkoieTbiHpMrYUI/WbjhXJQr7lI4VngixTgaG+yHX+NBCv7nW4hA0ShbvaNKw==", + "dev": true, + "requires": { + "ajv": "5.5.2", + "babel-code-frame": "6.26.0", + "chalk": "2.4.1", + "concat-stream": "1.6.2", + "cross-spawn": "5.1.0", + "debug": "3.1.0", + "doctrine": "2.1.0", + "eslint-scope": "3.7.1", + "eslint-visitor-keys": "1.0.0", + "espree": "3.5.4", + "esquery": "1.0.1", + "esutils": "2.0.2", + "file-entry-cache": "2.0.0", + "functional-red-black-tree": "1.0.1", + "glob": "7.1.2", + "globals": "11.5.0", + "ignore": "3.3.8", + "imurmurhash": "0.1.4", + "inquirer": "3.3.0", + "is-resolvable": "1.1.0", + "js-yaml": "3.12.0", + "json-stable-stringify-without-jsonify": "1.0.1", + "levn": "0.3.0", + "lodash": "4.17.4", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "natural-compare": "1.4.0", + "optionator": "0.8.2", + "path-is-inside": "1.0.2", + "pluralize": "7.0.0", + "progress": "2.0.0", + "require-uncached": "1.0.3", + "semver": "5.4.1", + "strip-ansi": "4.0.0", + "strip-json-comments": "2.0.1", + "table": "4.0.2", + "text-table": "0.2.0" + }, + "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 + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "4.1.2", + "shebang-command": "1.2.0", + "which": "1.3.0" + } + }, + "globals": { + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.5.0.tgz", + "integrity": "sha512-hYyf+kI8dm3nORsiiXUQigOU62hDLfJ9G01uyGMxhc6BKsircrUhC4uJPQPUSuq2GrTmiiEt7ewxlMdBewfmKQ==", + "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" + } + } + } + }, + "eslint-config-semistandard": { + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/eslint-config-semistandard/-/eslint-config-semistandard-12.0.1.tgz", + "integrity": "sha512-4zaPW5uRFasf2uRZkE19Y+W84KBV3q+oyWYOsgUN+5DQXE5HCsh7ZxeWDXxozk7NPycGm0kXcsJzLe5GZ1jCeg==", + "dev": true + }, + "eslint-config-standard": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-11.0.0.tgz", + "integrity": "sha512-oDdENzpViEe5fwuRCWla7AXQd++/oyIp8zP+iP9jiUPG6NBj3SHgdgtl/kTn00AjeN+1HNvavTKmYbMo+xMOlw==", + "dev": true + }, + "eslint-config-standard-jsx": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-5.0.0.tgz", + "integrity": "sha512-rLToPAEqLMPBfWnYTu6xRhm2OWziS2n40QFqJ8jAM8NSVzeVKTa3nclhsU4DpPJQRY60F34Oo1wi/71PN/eITg==", + "dev": true + }, + "eslint-import-resolver-node": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", + "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", + "dev": true, + "requires": { + "debug": "2.6.9", + "resolve": "1.5.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "eslint-module-utils": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz", + "integrity": "sha1-snA2LNiLGkitMIl2zn+lTphBF0Y=", + "dev": true, + "requires": { + "debug": "2.6.9", + "pkg-dir": "1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "pkg-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", + "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", + "dev": true, + "requires": { + "find-up": "1.1.2" + } + } + } + }, + "eslint-plugin-import": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.8.0.tgz", + "integrity": "sha512-Rf7dfKJxZ16QuTgVv1OYNxkZcsu/hULFnC+e+w0Gzi6jMC3guQoWQgxYxc54IDRinlb6/0v5z/PxxIKmVctN+g==", + "dev": true, + "requires": { + "builtin-modules": "1.1.1", + "contains-path": "0.1.0", + "debug": "2.6.9", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "0.3.2", + "eslint-module-utils": "2.2.0", + "has": "1.0.1", + "lodash.cond": "4.5.2", + "minimatch": "3.0.4", + "read-pkg-up": "2.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "requires": { + "esutils": "2.0.2", + "isarray": "1.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.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" + } + } + } + }, + "eslint-plugin-node": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-6.0.1.tgz", + "integrity": "sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw==", + "dev": true, + "requires": { + "ignore": "3.3.8", + "minimatch": "3.0.4", + "resolve": "1.5.0", + "semver": "5.4.1" + } + }, + "eslint-plugin-promise": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-3.6.0.tgz", + "integrity": "sha512-YQzM6TLTlApAr7Li8vWKR+K3WghjwKcYzY0d2roWap4SLK+kzuagJX/leTetIDWsFcTFnKNJXWupDCD6aZkP2Q==", + "dev": true + }, + "eslint-plugin-react": { + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.6.1.tgz", + "integrity": "sha512-30aMOHWX/DOaaLJVBHz6RMvYM2qy5GH63+y2PLFdIrYe4YLtODFmT3N1YA7ZqUnaBweVbedr4K4cqxOlWAPjIw==", + "dev": true, + "requires": { + "doctrine": "2.1.0", + "has": "1.0.1", + "jsx-ast-utils": "2.0.1", + "prop-types": "15.6.1" + } + }, + "eslint-plugin-standard": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-3.0.1.tgz", + "integrity": "sha1-NNDJFbRe3G8BA5PH7vOCOwhWXPI=", + "dev": true + }, + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "dev": true, + "requires": { + "esrecurse": "4.2.1", + "estraverse": "4.2.0" + } + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, + "espree": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", + "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", + "dev": true, + "requires": { + "acorn": "5.5.3", + "acorn-jsx": "3.0.1" + } + }, + "esprima": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "dev": true + }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "4.2.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "4.2.0" + } + }, "estraverse": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", @@ -1254,12 +2597,269 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, + "exec-sh": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.2.1.tgz", + "integrity": "sha512-aLt95pexaugVtQerpmE51+4QfWrNc304uez7jvj6fWnN8GeEHpttB8F36n8N7uVhUMbH/1enbxQ9HImZ4w/9qg==", + "dev": true, + "requires": { + "merge": "1.2.0" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "4.1.2", + "shebang-command": "1.2.0", + "which": "1.3.0" + } + } + } + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "2.2.4" + }, + "dependencies": { + "fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "dev": true, + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "3.0.0", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "expect": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-23.1.0.tgz", + "integrity": "sha1-v9/VeiogFw2HWZnul4fMcfAcIF8=", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "jest-diff": "23.0.1", + "jest-get-type": "22.4.3", + "jest-matcher-utils": "23.0.1", + "jest-message-util": "23.1.0", + "jest-regex-util": "23.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + } + } + }, "extend": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", "dev": true }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, + "external-editor": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "dev": true, + "requires": { + "chardet": "0.4.2", + "iconv-lite": "0.4.19", + "tmp": "0.0.33" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -1284,16 +2884,93 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "fb-watchman": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.0.tgz", + "integrity": "sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg=", "dev": true, "requires": { - "escape-string-regexp": "1.0.5", + "bser": "2.0.0" + } + }, + "fbjs": { + "version": "0.8.17", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz", + "integrity": "sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=", + "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.18" + }, + "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 + } + } + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true, + "requires": { + "flat-cache": "1.3.0", "object-assign": "4.1.1" } }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fileset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", + "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", + "dev": true, + "requires": { + "glob": "7.1.2", + "minimatch": "3.0.4" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", + "dev": true + }, "find-up": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", @@ -1304,13 +2981,31 @@ "pinkie-promise": "2.0.1" } }, - "for-each": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.2.tgz", - "integrity": "sha1-LEBFC5NI6X8oEyJZO6lnBLmr1NQ=", + "flat-cache": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", + "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", "dev": true, "requires": { - "is-function": "1.0.1" + "circular-json": "0.3.3", + "del": "2.2.2", + "graceful-fs": "4.1.11", + "write": "0.2.1" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "1.0.2" } }, "foreach": { @@ -1336,12 +3031,561 @@ "mime-types": "2.1.18" } }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "0.2.2" + } + }, + "fs-extra": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", + "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "jsonfile": "4.0.0", + "universalify": "0.1.1" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "fsevents": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "dev": true, + "optional": true, + "requires": { + "nan": "2.10.0", + "node-pre-gyp": "0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.3.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "2.2.4" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": "2.1.2" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "5.1.1", + "yallist": "3.0.2" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "2.2.4" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "2.6.9", + "iconv-lite": "0.4.21", + "sax": "1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "1.0.3", + "mkdirp": "0.5.1", + "needle": "2.2.0", + "nopt": "4.0.1", + "npm-packlist": "1.1.10", + "npmlog": "4.1.2", + "rc": "1.2.7", + "rimraf": "2.6.2", + "semver": "5.5.0", + "tar": "4.4.1" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1.1.1", + "osenv": "0.1.5" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "3.0.1", + "npm-bundled": "1.0.3" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "0.5.1", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true, + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "1.0.1", + "fs-minipass": "1.2.5", + "minipass": "2.2.4", + "minizlib": "1.1.0", + "mkdirp": "0.5.1", + "safe-buffer": "5.1.1", + "yallist": "3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true, + "dev": true + } + } + }, "fstream": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", @@ -1360,6 +3604,12 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "gauge": { "version": "2.7.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", @@ -1428,6 +3678,24 @@ "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", "dev": true }, + "get-stdin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -1451,12 +3719,45 @@ "path-is-absolute": "1.0.1" } }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "2.0.1" + } + }, "globals": { "version": "9.18.0", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", "dev": true }, + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true, + "requires": { + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, "globule": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.0.tgz", @@ -1484,6 +3785,101 @@ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", "dev": true }, + "growly": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", + "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", + "dev": true + }, + "handlebars": { + "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", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true, + "optional": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "optional": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + } + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "optional": true, + "requires": { + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "optional": true + } + } + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true, + "optional": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "optional": true, + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + } + } + } + }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -1544,6 +3940,38 @@ "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, "hawk": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", @@ -1568,6 +3996,16 @@ "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==", "dev": true }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, "hosted-git-info": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", @@ -1615,6 +4053,28 @@ "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", "dev": true }, + "ignore": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.8.tgz", + "integrity": "sha512-pUh+xUQQhQzevjRHHFqqcTy0/dP/kS9I8HSrUydhihjuD09W6ldVWFtIrwhXdUJHis3i2rZNqEHpZH/cbinFbg==", + "dev": true + }, + "import-local": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", + "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==", + "dev": true, + "requires": { + "pkg-dir": "2.0.0", + "resolve-cwd": "2.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, "in-publish": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", @@ -1646,6 +4106,54 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, + "inquirer": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", + "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "dev": true, + "requires": { + "ansi-escapes": "3.1.0", + "chalk": "2.4.1", + "cli-cursor": "2.1.0", + "cli-width": "2.2.0", + "external-editor": "2.2.0", + "figures": "2.0.0", + "lodash": "4.17.4", + "mute-stream": "0.0.7", + "run-async": "2.3.0", + "rx-lite": "4.0.8", + "rx-lite-aggregates": "4.0.8", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "through": "2.3.8" + }, + "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 + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "1.0.5" + } + }, + "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" + } + } + } + }, "invariant": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", @@ -1661,12 +4169,27 @@ "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", "dev": true }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, "is-builtin-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", @@ -1682,12 +4205,76 @@ "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=", "dev": true }, + "is-ci": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", + "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", + "dev": true, + "requires": { + "ci-info": "1.1.3" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, "is-date-object": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", "dev": true }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, "is-finite": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", @@ -1697,12 +4284,27 @@ "number-is-nan": "1.0.1" } }, - "is-function": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.1.tgz", - "integrity": "sha1-Es+5i2W1fdPRk6MSH19uL0N2ArU=", + "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 }, + "is-generator-fn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-1.0.0.tgz", + "integrity": "sha1-lp1J4bszKfa7fwkIm+JleLLd1Go=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, "is-my-ip-valid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", @@ -1722,6 +4324,83 @@ "xtend": "4.0.1" } }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "is-odd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", + "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", + "dev": true, + "requires": { + "is-number": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "dev": true, + "requires": { + "is-path-inside": "1.0.1" + } + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "requires": { + "path-is-inside": "1.0.2" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "3.0.1" + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, "is-property": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", @@ -1737,6 +4416,18 @@ "has": "1.0.1" } }, + "is-resolvable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, "is-symbol": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", @@ -1755,6 +4446,12 @@ "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", "dev": true }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -1767,12 +4464,734 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isomorphic-fetch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", + "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", + "dev": true, + "requires": { + "node-fetch": "1.7.3", + "whatwg-fetch": "2.0.4" + } + }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "dev": true }, + "istanbul-api": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.1.tgz", + "integrity": "sha512-duj6AlLcsWNwUpfyfHt0nWIeRiZpuShnP40YTxOGQgtaN8fd6JYSxsvxUphTDy8V5MfDXo4s/xVCIIvVCO808g==", + "dev": true, + "requires": { + "async": "2.6.1", + "compare-versions": "3.3.0", + "fileset": "2.0.3", + "istanbul-lib-coverage": "1.2.0", + "istanbul-lib-hook": "1.2.1", + "istanbul-lib-instrument": "1.10.1", + "istanbul-lib-report": "1.1.4", + "istanbul-lib-source-maps": "1.2.5", + "istanbul-reports": "1.3.0", + "js-yaml": "3.12.0", + "mkdirp": "0.5.1", + "once": "1.4.0" + } + }, + "istanbul-lib-coverage": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz", + "integrity": "sha512-GvgM/uXRwm+gLlvkWHTjDAvwynZkL9ns15calTrmhGgowlwJBbWMYzWbKqE2DT6JDP1AFXKa+Zi0EkqNCUqY0A==", + "dev": true + }, + "istanbul-lib-hook": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.1.tgz", + "integrity": "sha512-eLAMkPG9FU0v5L02lIkcj/2/Zlz9OuluaXikdr5iStk8FDbSwAixTK9TkYxbF0eNnzAJTwM2fkV2A1tpsIp4Jg==", + "dev": true, + "requires": { + "append-transform": "1.0.0" + } + }, + "istanbul-lib-instrument": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz", + "integrity": "sha512-1dYuzkOCbuR5GRJqySuZdsmsNKPL3PTuyPevQfoCXJePT9C8y1ga75neU+Tuy9+yS3G/dgx8wgOmp2KLpgdoeQ==", + "dev": true, + "requires": { + "babel-generator": "6.26.1", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "istanbul-lib-coverage": "1.2.0", + "semver": "5.4.1" + } + }, + "istanbul-lib-report": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz", + "integrity": "sha512-Azqvq5tT0U09nrncK3q82e/Zjkxa4tkFZv7E6VcqP0QCPn6oNljDPfrZEC/umNXds2t7b8sRJfs6Kmpzt8m2kA==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "1.2.0", + "mkdirp": "0.5.1", + "path-parse": "1.0.5", + "supports-color": "3.2.3" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.5.tgz", + "integrity": "sha512-8O2T/3VhrQHn0XcJbP1/GN7kXMiRAlPi+fj3uEHrjBD8Oz7Py0prSC25C09NuAZS6bgW1NNKAvCSHZXB0irSGA==", + "dev": true, + "requires": { + "debug": "3.1.0", + "istanbul-lib-coverage": "1.2.0", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "source-map": "0.5.7" + } + }, + "istanbul-reports": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.3.0.tgz", + "integrity": "sha512-y2Z2IMqE1gefWUaVjrBm0mSKvUkaBy9Vqz8iwr/r40Y9hBbIteH5wqHG/9DLTfJ9xUnUT2j7A3+VVJ6EaYBllA==", + "dev": true, + "requires": { + "handlebars": "4.0.11" + } + }, + "jest": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-23.1.0.tgz", + "integrity": "sha1-u7f4kxAKEadC3YvQ0EelSwlorRo=", + "dev": true, + "requires": { + "import-local": "1.0.0", + "jest-cli": "23.1.0" + }, + "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 + }, + "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": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "wrap-ansi": "2.1.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "jest-cli": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-23.1.0.tgz", + "integrity": "sha1-64vdTODRUlCJLjGtm2m8mdKo9r8=", + "dev": true, + "requires": { + "ansi-escapes": "3.1.0", + "chalk": "2.4.1", + "exit": "0.1.2", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "import-local": "1.0.0", + "is-ci": "1.1.0", + "istanbul-api": "1.3.1", + "istanbul-lib-coverage": "1.2.0", + "istanbul-lib-instrument": "1.10.1", + "istanbul-lib-source-maps": "1.2.5", + "jest-changed-files": "23.0.1", + "jest-config": "23.1.0", + "jest-environment-jsdom": "23.1.0", + "jest-get-type": "22.4.3", + "jest-haste-map": "23.1.0", + "jest-message-util": "23.1.0", + "jest-regex-util": "23.0.0", + "jest-resolve-dependencies": "23.0.1", + "jest-runner": "23.1.0", + "jest-runtime": "23.1.0", + "jest-snapshot": "23.0.1", + "jest-util": "23.1.0", + "jest-validate": "23.0.1", + "jest-watcher": "23.1.0", + "jest-worker": "23.0.1", + "micromatch": "2.3.11", + "node-notifier": "5.2.1", + "realpath-native": "1.0.0", + "rimraf": "2.6.2", + "slash": "1.0.0", + "string-length": "2.0.0", + "strip-ansi": "4.0.0", + "which": "1.3.0", + "yargs": "11.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" + } + }, + "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" + } + }, + "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 + }, + "yargs": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", + "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", + "dev": true, + "requires": { + "cliui": "4.1.0", + "decamelize": "1.2.0", + "find-up": "2.1.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.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": "9.0.2" + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "4.1.0" + } + } + } + }, + "jest-changed-files": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-23.0.1.tgz", + "integrity": "sha1-95Vy0HIIROpd+EwqRI6GLCJU9gw=", + "dev": true, + "requires": { + "throat": "4.1.0" + } + }, + "jest-config": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-23.1.0.tgz", + "integrity": "sha1-cIyg9DHTVu5CT7SJXTMIAGvdgkE=", + "dev": true, + "requires": { + "babel-core": "6.26.3", + "babel-jest": "23.0.1", + "chalk": "2.4.1", + "glob": "7.1.2", + "jest-environment-jsdom": "23.1.0", + "jest-environment-node": "23.1.0", + "jest-get-type": "22.4.3", + "jest-jasmine2": "23.1.0", + "jest-regex-util": "23.0.0", + "jest-resolve": "23.1.0", + "jest-util": "23.1.0", + "jest-validate": "23.0.1", + "pretty-format": "23.0.1" + } + }, + "jest-diff": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-23.0.1.tgz", + "integrity": "sha1-PUkTfO4SwyCktNK0pvpugtSRoWo=", + "dev": true, + "requires": { + "chalk": "2.4.1", + "diff": "3.5.0", + "jest-get-type": "22.4.3", + "pretty-format": "23.0.1" + } + }, + "jest-docblock": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-23.0.1.tgz", + "integrity": "sha1-3t3RgzO+XcJBUmCgTvP86SdrVyU=", + "dev": true, + "requires": { + "detect-newline": "2.1.0" + } + }, + "jest-each": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-23.1.0.tgz", + "integrity": "sha1-FhRrWSw1SGelrl4TzfFcbGW2lsY=", + "dev": true, + "requires": { + "chalk": "2.4.1", + "pretty-format": "23.0.1" + } + }, + "jest-environment-jsdom": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-23.1.0.tgz", + "integrity": "sha1-hZKZFOI77TV32sl1X0EG0Gl8R5w=", + "dev": true, + "requires": { + "jest-mock": "23.1.0", + "jest-util": "23.1.0", + "jsdom": "11.10.0" + } + }, + "jest-environment-node": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-23.1.0.tgz", + "integrity": "sha1-RSwL+UnPy7rNoeF2Lu7XC8eEx9U=", + "dev": true, + "requires": { + "jest-mock": "23.1.0", + "jest-util": "23.1.0" + } + }, + "jest-get-type": { + "version": "22.4.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz", + "integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==", + "dev": true + }, + "jest-haste-map": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-23.1.0.tgz", + "integrity": "sha1-GObH1ajScTb5G32YUvhd4McHTEk=", + "dev": true, + "requires": { + "fb-watchman": "2.0.0", + "graceful-fs": "4.1.11", + "jest-docblock": "23.0.1", + "jest-serializer": "23.0.1", + "jest-worker": "23.0.1", + "micromatch": "2.3.11", + "sane": "2.5.2" + } + }, + "jest-jasmine2": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-23.1.0.tgz", + "integrity": "sha1-SvqzFym2VN3NKwdK3YSTlvE7MLg=", + "dev": true, + "requires": { + "chalk": "2.4.1", + "co": "4.6.0", + "expect": "23.1.0", + "is-generator-fn": "1.0.0", + "jest-diff": "23.0.1", + "jest-each": "23.1.0", + "jest-matcher-utils": "23.0.1", + "jest-message-util": "23.1.0", + "jest-snapshot": "23.0.1", + "jest-util": "23.1.0", + "pretty-format": "23.0.1" + } + }, + "jest-leak-detector": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-23.0.1.tgz", + "integrity": "sha1-nboHUFrDSVw50+wJrB5WRZnoYaA=", + "dev": true, + "requires": { + "pretty-format": "23.0.1" + } + }, + "jest-matcher-utils": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-23.0.1.tgz", + "integrity": "sha1-DGwNrt+YM8Kn82I2Bp7+y0w/bl8=", + "dev": true, + "requires": { + "chalk": "2.4.1", + "jest-get-type": "22.4.3", + "pretty-format": "23.0.1" + } + }, + "jest-message-util": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-23.1.0.tgz", + "integrity": "sha1-moCbpIfsrFzlEdTmmO47XuJGHqk=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.51", + "chalk": "2.4.1", + "micromatch": "2.3.11", + "slash": "1.0.0", + "stack-utils": "1.0.1" + } + }, + "jest-mock": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-23.1.0.tgz", + "integrity": "sha1-o4HDGxIasfYMRiotrbe4bczKxIc=", + "dev": true + }, + "jest-regex-util": { + "version": "23.0.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-23.0.0.tgz", + "integrity": "sha1-3Vwf3gxG9DcTFM8Q96dRoj9Oj3Y=", + "dev": true + }, + "jest-resolve": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-23.1.0.tgz", + "integrity": "sha1-ueMW7s69bwC8UKOWDRUnuuZXktI=", + "dev": true, + "requires": { + "browser-resolve": "1.11.2", + "chalk": "2.4.1", + "realpath-native": "1.0.0" + } + }, + "jest-resolve-dependencies": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-23.0.1.tgz", + "integrity": "sha1-0BoQ3a2RUsTOzfXqwriFccS2pk0=", + "dev": true, + "requires": { + "jest-regex-util": "23.0.0", + "jest-snapshot": "23.0.1" + } + }, + "jest-runner": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-23.1.0.tgz", + "integrity": "sha1-+iCpM//3MaVDKzVh5/ZCZZT6KbU=", + "dev": true, + "requires": { + "exit": "0.1.2", + "graceful-fs": "4.1.11", + "jest-config": "23.1.0", + "jest-docblock": "23.0.1", + "jest-haste-map": "23.1.0", + "jest-jasmine2": "23.1.0", + "jest-leak-detector": "23.0.1", + "jest-message-util": "23.1.0", + "jest-runtime": "23.1.0", + "jest-util": "23.1.0", + "jest-worker": "23.0.1", + "source-map-support": "0.5.6", + "throat": "4.1.0" + }, + "dependencies": { + "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 + }, + "source-map-support": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz", + "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", + "dev": true, + "requires": { + "buffer-from": "1.1.0", + "source-map": "0.6.1" + } + } + } + }, + "jest-runtime": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-23.1.0.tgz", + "integrity": "sha1-tK4OhyWeys/UqIS2OdsHz03WIK8=", + "dev": true, + "requires": { + "babel-core": "6.26.3", + "babel-plugin-istanbul": "4.1.6", + "chalk": "2.4.1", + "convert-source-map": "1.5.1", + "exit": "0.1.2", + "fast-json-stable-stringify": "2.0.0", + "graceful-fs": "4.1.11", + "jest-config": "23.1.0", + "jest-haste-map": "23.1.0", + "jest-message-util": "23.1.0", + "jest-regex-util": "23.0.0", + "jest-resolve": "23.1.0", + "jest-snapshot": "23.0.1", + "jest-util": "23.1.0", + "jest-validate": "23.0.1", + "micromatch": "2.3.11", + "realpath-native": "1.0.0", + "slash": "1.0.0", + "strip-bom": "3.0.0", + "write-file-atomic": "2.3.0", + "yargs": "11.0.0" + }, + "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 + }, + "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": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "wrap-ansi": "2.1.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.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" + } + }, + "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" + } + }, + "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 + }, + "yargs": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", + "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", + "dev": true, + "requires": { + "cliui": "4.1.0", + "decamelize": "1.2.0", + "find-up": "2.1.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.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": "9.0.2" + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "4.1.0" + } + } + } + }, + "jest-serializer": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-23.0.1.tgz", + "integrity": "sha1-o3dq6zEekP6D+rnlM+hRAr0WQWU=", + "dev": true + }, + "jest-snapshot": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-23.0.1.tgz", + "integrity": "sha1-ZnT6Gbnraamcq+zUFb3cQtavPn4=", + "dev": true, + "requires": { + "chalk": "2.4.1", + "jest-diff": "23.0.1", + "jest-matcher-utils": "23.0.1", + "mkdirp": "0.5.1", + "natural-compare": "1.4.0", + "pretty-format": "23.0.1" + } + }, + "jest-tap-reporter": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/jest-tap-reporter/-/jest-tap-reporter-1.9.0.tgz", + "integrity": "sha512-KBNkyWWDO0sGc593H04+QJuMHm9WEwe/0RnMD5ke2spA7nNMQao3ktU34brfOBKk7vNn5EbGIr2pODxNQo+bNA==", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.36", + "chalk": "2.4.1", + "string.prototype.padend": "3.0.0", + "string.prototype.padstart": "3.0.0", + "strip-ansi": "4.0.0", + "utf8-bar": "0.1.0" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.0.0-beta.36", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.36.tgz", + "integrity": "sha512-sW77BFwJ48YvQp3Gzz5xtAUiXuYOL2aMJKDwiaY3OcvdqBFurtYfOpSa4QrNyDxmOGRFSYzUpabU2m9QrlWE7w==", + "dev": true, + "requires": { + "chalk": "2.4.1", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "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" + } + } + } + }, + "jest-util": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-23.1.0.tgz", + "integrity": "sha1-wCUbrzRkTG3S/qeKli9CY6xVdy0=", + "dev": true, + "requires": { + "callsites": "2.0.0", + "chalk": "2.4.1", + "graceful-fs": "4.1.11", + "is-ci": "1.1.0", + "jest-message-util": "23.1.0", + "mkdirp": "0.5.1", + "slash": "1.0.0", + "source-map": "0.6.1" + }, + "dependencies": { + "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 + } + } + }, + "jest-validate": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-23.0.1.tgz", + "integrity": "sha1-zZ8BqJ0mu4hfEqhmdxXpyGWldU8=", + "dev": true, + "requires": { + "chalk": "2.4.1", + "jest-get-type": "22.4.3", + "leven": "2.1.0", + "pretty-format": "23.0.1" + } + }, + "jest-watcher": { + "version": "23.1.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-23.1.0.tgz", + "integrity": "sha1-qNWELjjZ+0r/+CPfartCpYrmzb0=", + "dev": true, + "requires": { + "ansi-escapes": "3.1.0", + "chalk": "2.4.1", + "string-length": "2.0.0" + } + }, + "jest-worker": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-23.0.1.tgz", + "integrity": "sha1-nmSd2WP/QEYCb5HEAX8Dmmqkp7w=", + "dev": true, + "requires": { + "merge-stream": "1.0.1" + } + }, "js-base64": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.3.tgz", @@ -1785,6 +5204,16 @@ "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", "dev": true }, + "js-yaml": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "dev": true, + "requires": { + "argparse": "1.0.10", + "esprima": "4.0.0" + } + }, "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", @@ -1826,6 +5255,18 @@ "xml-name-validator": "3.0.0" } }, + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -1838,12 +5279,33 @@ "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", "dev": true }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11" + } + }, "jsonpointer": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", @@ -1862,6 +5324,31 @@ "verror": "1.10.0" } }, + "jsx-ast-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz", + "integrity": "sha1-6AGxs5mF4g//yHtA43SAgOLcrH8=", + "dev": true, + "requires": { + "array-includes": "3.0.3" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true, + "optional": true + }, "lcid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", @@ -1877,6 +5364,12 @@ "integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==", "dev": true }, + "leven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", + "dev": true + }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -1896,6 +5389,36 @@ "uc.micro": "1.0.5" } }, + "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" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + }, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, "lodash": { "version": "4.17.4", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", @@ -1914,18 +5437,42 @@ "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", "dev": true }, + "lodash.cond": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/lodash.cond/-/lodash.cond-4.5.2.tgz", + "integrity": "sha1-9HGh2khr5g9quVXRcRVSPdHSVdU=", + "dev": true + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", + "dev": true + }, "lodash.mergewith": { "version": "4.6.1", "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==", "dev": true }, + "lodash.some": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz", + "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=", + "dev": true + }, "lodash.sortby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", "dev": true }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, "loose-envify": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", @@ -1961,12 +5508,45 @@ "yallist": "2.1.2" } }, + "magic-string": { + "version": "0.22.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", + "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", + "dev": true, + "requires": { + "vlq": "0.2.3" + } + }, + "makeerror": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", + "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=", + "dev": true, + "requires": { + "tmpl": "1.0.4" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, "map-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", "dev": true }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "1.0.1" + } + }, "markdown-it": { "version": "8.4.1", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.1.tgz", @@ -1980,12 +5560,27 @@ "uc.micro": "1.0.5" } }, + "math-random": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", + "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", + "dev": true + }, "mdurl": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", "dev": true }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "1.2.0" + } + }, "meow": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", @@ -2004,6 +5599,88 @@ "trim-newlines": "1.0.0" } }, + "merge": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.0.tgz", + "integrity": "sha1-dTHjnUlJwoGma4xabgJl6LBYlNo=", + "dev": true + }, + "merge-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", + "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", + "dev": true, + "requires": { + "readable-stream": "2.3.3" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + }, + "dependencies": { + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "1.1.0" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + } + } + }, "mime-db": { "version": "1.33.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", @@ -2019,6 +5696,12 @@ "mime-db": "1.33.0" } }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, "mini.css": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/mini.css/-/mini.css-2.3.7.tgz", @@ -2040,6 +5723,27 @@ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "dev": true, + "requires": { + "for-in": "1.0.2", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, "mkdirp": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", @@ -2057,12 +5761,58 @@ } } }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, "nan": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", "dev": true }, + "nanomatch": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", + "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", + "dev": true, + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "fragment-cache": "0.2.1", + "is-odd": "2.0.0", + "is-windows": "1.0.2", + "kind-of": "6.0.2", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, "no-case": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", @@ -2072,6 +5822,16 @@ "lower-case": "1.1.4" } }, + "node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "dev": true, + "requires": { + "encoding": "0.1.12", + "is-stream": "1.1.0" + } + }, "node-gyp": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.6.2.tgz", @@ -2101,6 +5861,24 @@ } } }, + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "dev": true + }, + "node-notifier": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.2.1.tgz", + "integrity": "sha512-MIBs+AAd6dJ2SklbbE8RUDRlIVhU8MaNLh1A9SUZDUHPiZkWLFde6UNwG41yQHZEToHgJMXqyVZ9UcS/ReOVTg==", + "dev": true, + "requires": { + "growly": "1.3.0", + "semver": "5.4.1", + "shellwords": "0.1.1", + "which": "1.3.0" + } + }, "node-sass": { "version": "4.9.0", "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.0.tgz", @@ -2307,6 +6085,24 @@ "validate-npm-package-license": "3.0.3" } }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "1.1.0" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "2.0.1" + } + }, "npmlog": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", @@ -2343,11 +6139,27 @@ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true }, - "object-inspect": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.5.0.tgz", - "integrity": "sha512-UmOFbHbwvv+XHj7BerrhVq+knjceBdkvU5AriwLMvhv2qi+e7DJzxfBeFpILEjVzCp+xA+W/pIf06RGPWlZNfw==", - "dev": true + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + } + } }, "object-keys": { "version": "1.0.11", @@ -2355,6 +6167,44 @@ "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=", "dev": true }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "3.0.1" + } + }, + "object.getownpropertydescriptors": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "dev": true, + "requires": { + "define-properties": "1.1.2", + "es-abstract": "1.11.0" + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "3.0.1" + } + }, "octicons": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/octicons/-/octicons-7.2.0.tgz", @@ -2373,6 +6223,39 @@ "wrappy": "1.0.2" } }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "1.2.0" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "0.0.10", + "wordwrap": "0.0.3" + }, + "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "dev": true + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + } + } + }, "optionator": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", @@ -2418,6 +6301,36 @@ "os-tmpdir": "1.0.2" } }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "1.3.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, "param-case": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", @@ -2427,6 +6340,18 @@ "no-case": "2.3.2" } }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + } + }, "parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", @@ -2436,18 +6361,18 @@ "error-ex": "1.3.1" } }, - "parse-ms": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-1.0.1.tgz", - "integrity": "sha1-VjRtR0nXjyNDDKDHE4UK75GqNh0=", - "dev": true - }, "parse5": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", "dev": true }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, "path-exists": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", @@ -2463,6 +6388,18 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, "path-parse": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", @@ -2507,10 +6444,90 @@ "pinkie": "2.0.4" } }, - "plur": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/plur/-/plur-1.0.0.tgz", - "integrity": "sha1-24XGgU9eXlo7Se/CjWBP7GKXUVY=", + "pkg-conf": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", + "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", + "dev": true, + "requires": { + "find-up": "2.1.0", + "load-json-file": "4.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "4.0.0", + "pify": "3.0.0", + "strip-bom": "3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "1.3.1", + "json-parse-better-errors": "1.0.2" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "pkg-config": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pkg-config/-/pkg-config-1.1.1.tgz", + "integrity": "sha1-VX7yLXPaPIg3EHdmxS6tq94pj+Q=", + "dev": true, + "requires": { + "debug-log": "1.0.1", + "find-root": "1.1.0", + "xtend": "4.0.1" + } + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "2.1.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + } + } + }, + "pluralize": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", "dev": true }, "pn": { @@ -2519,27 +6536,55 @@ "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==", "dev": true }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, "prettier": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.12.1.tgz", "integrity": "sha1-wa0g6APndJ+vkFpAnSNn4Gu+cyU=", "dev": true }, - "pretty-ms": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-2.1.0.tgz", - "integrity": "sha1-QlfCVt8/sLRR1q/6qwIYhBJpgdw=", + "pretty-format": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-23.0.1.tgz", + "integrity": "sha1-1h0GUmjkx1kIO8y8onoBrXx2AfQ=", "dev": true, "requires": { - "is-finite": "1.0.2", - "parse-ms": "1.0.1", - "plur": "1.0.0" + "ansi-regex": "3.0.0", + "ansi-styles": "3.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.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + } } }, "prismjs": { @@ -2563,6 +6608,32 @@ "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", "dev": true }, + "progress": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", + "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", + "dev": true + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "dev": true, + "requires": { + "asap": "2.0.6" + } + }, + "prop-types": { + "version": "15.6.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.1.tgz", + "integrity": "sha512-4ec7bY1Y66LymSUOH/zARVYObB23AT2h8cf6e/O6ZALB/N0sqZFEx7rq6EYPX2MkOdKORuooI/H5k9TlR4q7kQ==", + "dev": true, + "requires": { + "fbjs": "0.8.17", + "loose-envify": "1.3.1", + "object-assign": "4.1.1" + } + }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", @@ -2581,11 +6652,30 @@ "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", "dev": true }, - "re-emitter": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/re-emitter/-/re-emitter-1.1.3.tgz", - "integrity": "sha1-+p4xn/3u6zWycpbvDz03TawvUqc=", - "dev": true + "randomatic": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.0.0.tgz", + "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", + "dev": true, + "requires": { + "is-number": "4.0.0", + "kind-of": "6.0.2", + "math-random": "1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } }, "read-pkg": { "version": "1.1.0", @@ -2647,6 +6737,15 @@ "util-deprecate": "1.0.2" } }, + "realpath-native": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/realpath-native/-/realpath-native-1.0.0.tgz", + "integrity": "sha512-XJtlRJ9jf0E1H1SLeJyQ9PGzQD7S65h1pRXEcAeK48doKOnKxcgPeNohJvD5u/2sI9J1oke6E8bZHS/fmW1UiQ==", + "dev": true, + "requires": { + "util.promisify": "1.0.0" + } + }, "redent": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", @@ -2680,6 +6779,25 @@ "private": "0.1.8" } }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "requires": { + "is-equal-shallow": "0.1.3" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" + } + }, "regexpu-core": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", @@ -2720,6 +6838,18 @@ "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", "dev": true }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "dev": true + }, "repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", @@ -2797,6 +6927,24 @@ "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", "dev": true }, + "require-uncached": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "dev": true, + "requires": { + "caller-path": "0.1.0", + "resolve-from": "1.0.1" + }, + "dependencies": { + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + } + } + }, "resolve": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", @@ -2806,13 +6954,51 @@ "path-parse": "1.0.5" } }, - "resumer": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", - "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=", + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "dev": true, "requires": { - "through": "2.3.8" + "resolve-from": "3.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "2.0.1", + "signal-exit": "3.0.2" + } + }, + "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 + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4" } }, "rimraf": { @@ -2824,6 +7010,16 @@ "glob": "7.1.2" } }, + "rollup": { + "version": "0.58.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.58.2.tgz", + "integrity": "sha512-RZVvCWm9BHOYloaE6LLiE/ibpjv1CmI8F8k0B0Cp+q1eezo3cswszJH1DN0djgzSlo0hjuuCmyeI+1XOYLl4wg==", + "dev": true, + "requires": { + "@types/estree": "0.0.38", + "@types/node": "10.3.3" + } + }, "rollup-plugin-babel": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-3.0.4.tgz", @@ -2833,6 +7029,28 @@ "rollup-pluginutils": "1.5.2" } }, + "rollup-plugin-babel-minify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-babel-minify/-/rollup-plugin-babel-minify-4.0.0.tgz", + "integrity": "sha512-aqQTNCjrYZrWogHVpPQPVFRB/oKT9pGQzW8M/l3lRRuNz1zPtsYR/3shd5/SA8Msfb4HIytBEFUOQBCMoVVx6Q==", + "dev": true, + "requires": { + "@comandeer/babel-plugin-banner": "1.0.0", + "babel-core": "6.26.3", + "babel-preset-minify": "0.3.0", + "depd": "1.1.2", + "magic-string": "0.22.5", + "semver": "5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + } + } + }, "rollup-pluginutils": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz", @@ -2843,12 +7061,103 @@ "minimatch": "3.0.4" } }, + "rsvp": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-3.6.2.tgz", + "integrity": "sha512-OfWGQTb9vnwRjwtA2QwpG2ICclHC3pgXZO5xt8H2EfgDquO0qVdSb5T88L4qJVAEugbS56pAuV4XZM58UX8ulw==", + "dev": true + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "2.1.0" + } + }, + "run-parallel": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", + "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==", + "dev": true + }, + "rx-lite": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", + "dev": true + }, + "rx-lite-aggregates": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", + "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "dev": true, + "requires": { + "rx-lite": "4.0.8" + } + }, "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", "dev": true }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "0.1.15" + } + }, + "sane": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/sane/-/sane-2.5.2.tgz", + "integrity": "sha1-tNwYYcIbQn6SlQej51HiosuKs/o=", + "dev": true, + "requires": { + "anymatch": "2.0.0", + "capture-exit": "1.2.0", + "exec-sh": "0.2.1", + "fb-watchman": "2.0.0", + "fsevents": "1.2.4", + "micromatch": "3.1.10", + "minimist": "1.2.0", + "walker": "1.0.7", + "watch": "0.18.0" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } + } + } + }, "sass-graph": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", @@ -2895,6 +7204,24 @@ "dev": true, "optional": true }, + "semistandard": { + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/semistandard/-/semistandard-12.0.1.tgz", + "integrity": "sha512-+FBRXBCi8GC1Nivc4ruw2KXER31bE1lrNyESo7prn2Sv9I9+H/Iqpt0NOtlV/GUxq34AgJwJViBUpA3/PUGqOw==", + "dev": true, + "requires": { + "eslint": "4.18.2", + "eslint-config-semistandard": "12.0.1", + "eslint-config-standard": "11.0.0", + "eslint-config-standard-jsx": "5.0.0", + "eslint-plugin-import": "2.8.0", + "eslint-plugin-node": "6.0.1", + "eslint-plugin-promise": "3.6.0", + "eslint-plugin-react": "7.6.1", + "eslint-plugin-standard": "3.0.1", + "standard-engine": "8.0.1" + } + }, "semver": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", @@ -2907,12 +7234,188 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shellwords": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", + "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", + "dev": true + }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "slice-ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0" + } + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.2", + "use": "3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, "sntp": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", @@ -2928,6 +7431,34 @@ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "dev": true }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "2.1.1", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" + } + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, + "requires": { + "source-map": "0.5.7" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, "spdx-correct": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", @@ -2960,13 +7491,13 @@ "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", "dev": true }, - "split": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", - "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "dev": true, "requires": { - "through": "2.3.8" + "extend-shallow": "3.0.2" } }, "sprintf-js": { @@ -2991,6 +7522,45 @@ "tweetnacl": "0.14.5" } }, + "stack-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz", + "integrity": "sha1-1PM6tU6OOHeLDKXP07OvsS22hiA=", + "dev": true + }, + "standard-engine": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-8.0.1.tgz", + "integrity": "sha512-LA531C3+nljom/XRvdW/hGPXwmilRkaRkENhO3FAGF1Vtq/WtCXzgmnc5S6vUHHsgv534MRy02C1ikMwZXC+tw==", + "dev": true, + "requires": { + "deglob": "2.1.1", + "get-stdin": "6.0.0", + "minimist": "1.2.0", + "pkg-conf": "2.1.0" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "0.2.5", + "object-copy": "0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + } + } + }, "stdout-stream": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.0.tgz", @@ -3006,10 +7576,75 @@ "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", "dev": true }, - "string.prototype.trim": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz", - "integrity": "sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo=", + "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" + }, + "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 + }, + "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" + } + } + } + }, + "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": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "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" + } + } + } + }, + "string.prototype.padend": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz", + "integrity": "sha1-86rvfBcZ8XDF6rHDK/eA2W4h8vA=", + "dev": true, + "requires": { + "define-properties": "1.1.2", + "es-abstract": "1.11.0", + "function-bind": "1.1.1" + } + }, + "string.prototype.padstart": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.padstart/-/string.prototype.padstart-3.0.0.tgz", + "integrity": "sha1-W8+tOfRkm7LQMSkuGbzwtRDUskI=", "dev": true, "requires": { "define-properties": "1.1.2", @@ -3041,6 +7676,18 @@ "ansi-regex": "2.1.1" } }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, "strip-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", @@ -3058,6 +7705,12 @@ } } }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", @@ -3070,74 +7723,18 @@ "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=", "dev": true }, - "tap-out": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/tap-out/-/tap-out-1.4.2.tgz", - "integrity": "sha1-yQfsG/lAURHQiCY+kvVgi4jLs3o=", + "table": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", + "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", "dev": true, "requires": { - "re-emitter": "1.1.3", - "readable-stream": "2.3.3", - "split": "1.0.1", - "trim": "0.0.1" - } - }, - "tap-spec": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/tap-spec/-/tap-spec-4.1.1.tgz", - "integrity": "sha1-4unyb1IIIysfViKIyXYk1YqI8Fo=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "duplexer": "0.1.1", - "figures": "1.7.0", - "lodash": "3.10.1", - "pretty-ms": "2.1.0", - "repeat-string": "1.6.1", - "tap-out": "1.4.2", - "through2": "2.0.3" - }, - "dependencies": { - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - } - }, - "lodash": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", - "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", - "dev": true - } - } - }, - "tape": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/tape/-/tape-4.9.0.tgz", - "integrity": "sha512-j0jO9BiScfqtPBb9QmPLL0qvxXMz98xjkMb7x8lKipFlJZwNJkqkWPou+NU4V6T9RnVh1kuSthLE8gLrN8bBfw==", - "dev": true, - "requires": { - "deep-equal": "1.0.1", - "defined": "1.0.0", - "for-each": "0.3.2", - "function-bind": "1.1.1", - "glob": "7.1.2", - "has": "1.0.1", - "inherits": "2.0.3", - "minimist": "1.2.0", - "object-inspect": "1.5.0", - "resolve": "1.5.0", - "resumer": "0.0.0", - "string.prototype.trim": "1.1.2", - "through": "2.3.8" + "ajv": "5.5.2", + "ajv-keywords": "2.1.1", + "chalk": "2.4.1", + "lodash": "4.17.4", + "slice-ansi": "1.0.0", + "string-width": "2.1.1" } }, "tar": { @@ -3151,22 +7748,66 @@ "inherits": "2.0.3" } }, + "test-exclude": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.2.1.tgz", + "integrity": "sha512-qpqlP/8Zl+sosLxBcVKl9vYy26T9NPalxSzzCP/OY6K7j938ui2oKgo+kRZYfxAeIpLqpbVnsHq1tyV70E4lWQ==", + "dev": true, + "requires": { + "arrify": "1.0.1", + "micromatch": "3.1.10", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "require-main-filename": "1.0.1" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "throat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz", + "integrity": "sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=", + "dev": true + }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "dev": true, - "requires": { - "readable-stream": "2.3.3", - "xtend": "4.0.1" - } - }, "tiny-emitter": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.0.2.tgz", @@ -3174,12 +7815,58 @@ "dev": true, "optional": true }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "1.0.2" + } + }, + "tmpl": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", + "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", + "dev": true + }, "to-fast-properties": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", "dev": true }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "3.0.0", + "repeat-string": "1.6.1" + } + }, "tough-cookie": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", @@ -3206,18 +7893,18 @@ "punycode": "2.1.0" } }, - "trim": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", - "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=", - "dev": true - }, "trim-newlines": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", "dev": true }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, "true-case-path": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.2.tgz", @@ -3267,6 +7954,18 @@ "prelude-ls": "1.1.2" } }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "ua-parser-js": { + "version": "0.7.18", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.18.tgz", + "integrity": "sha512-LtzwHlVHwFGTptfNSgezHp7WUlwiqb0gA9AALRbKaERfxwJoiX0A73QbTToxteIAuIaFshhgIZfqK8s7clqgnA==", + "dev": true + }, "uc.micro": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.5.tgz", @@ -3291,18 +7990,151 @@ } } }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" + } + } + } + }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "dev": true + }, + "universalify": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", + "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "0.3.1", + "isobject": "3.0.1" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, "upper-case": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", "dev": true }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "use": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", + "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", + "dev": true, + "requires": { + "kind-of": "6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "utf8-bar": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/utf8-bar/-/utf8-bar-0.1.0.tgz", + "integrity": "sha512-AU+KwhlIChF/Su3d/tBrnhtDS6Bd1YWXeRc/If2/XEV/3f8LTSGJQQVONqUI6fwwTrkT5GKbdYxm7qQD7nEcCQ==", + "dev": true + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, + "util.promisify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "dev": true, + "requires": { + "define-properties": "1.1.2", + "object.getownpropertydescriptors": "2.0.3" + } + }, "uuid": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", @@ -3330,6 +8162,12 @@ "extsprintf": "1.3.0" } }, + "vlq": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", + "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==", + "dev": true + }, "w3c-hr-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz", @@ -3339,6 +8177,25 @@ "browser-process-hrtime": "0.1.2" } }, + "walker": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", + "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=", + "dev": true, + "requires": { + "makeerror": "1.0.11" + } + }, + "watch": { + "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" + } + }, "webidl-conversions": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", @@ -3354,6 +8211,12 @@ "iconv-lite": "0.4.19" } }, + "whatwg-fetch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", + "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==", + "dev": true + }, "whatwg-mimetype": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.1.0.tgz", @@ -3417,6 +8280,13 @@ } } }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true, + "optional": true + }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", @@ -3461,6 +8331,26 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true, + "requires": { + "mkdirp": "0.5.1" + } + }, + "write-file-atomic": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "signal-exit": "3.0.2" + } + }, "ws": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ws/-/ws-4.1.0.tgz", diff --git a/package.json b/package.json index c0bc1c84d..1e2008d3d 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "chalk": "^2.4.1", "fs-extra": "^6.0.0", "html-minifier": "^3.5.15", - "jsdom": "^11.10.0", + "jest": "^23.1.0", + "jest-tap-reporter": "^1.9.0", "markdown-it": "^8.4.1", "mini.css": "^2.3.7", "node-sass": "^4.9.0", @@ -14,9 +15,7 @@ "rollup": "^0.58.2", "rollup-plugin-babel": "^3.0.4", "rollup-plugin-babel-minify": "^4.0.0", - "semistandard": "^12.0.1", - "tap-spec": "^4.1.1", - "tape": "^4.9.0" + "semistandard": "^12.0.1" }, "name": "30-seconds-of-code", "description": "A collection of useful JavaScript snippets.", @@ -32,7 +31,7 @@ "extractor": "node ./scripts/extract.js", "packager": "node ./scripts/module.js", "localizer": "node ./scripts/localize.js", - "test": "tape test/**/*.test.js | tap-spec" + "test": "jest --verbose" }, "repository": { "type": "git", @@ -49,5 +48,17 @@ "url": "https://github.com/Chalarangelo/30-seconds-of-code/issues" }, "homepage": "https://github.com/Chalarangelo/30-seconds-of-code#readme", - "dependencies": {} + "dependencies": {}, + "jest": { + "reporters": [ + [ + "jest-tap-reporter", + { + "logLevel": "INFO", + "showInternalStackTraces": false, + "filePath": "test/testlog" + } + ] + ] + } } diff --git a/scripts/tdd.js b/scripts/tdd.js index 0ade624d5..1026aaecb 100644 --- a/scripts/tdd.js +++ b/scripts/tdd.js @@ -5,7 +5,7 @@ // Load modules const fs = require('fs-extra'), path = require('path'); -const child_process = require('child_process'); +const childProcess = require('child_process'); const chalk = require('chalk'); const util = require('./util'); if(util.isTravisCI() && process.env['TRAVIS_EVENT_TYPE'] !== 'cron' && process.env['TRAVIS_EVENT_TYPE'] !== 'api') { @@ -64,16 +64,10 @@ snippetFiles // Export template for snippetName.test.js which generates a example test & other information const exportTest = [ - `const test = require('tape');`, + `const expect = require('expect');`, `const ${fileName} = require('./${fileName}.js');`, - `\ntest('Testing ${fileName}', (t) => {`, - ` //For more information on all the methods supported by tape\n //Please go to https://github.com/substack/tape`, - ` t.true(typeof ${fileName} === 'function', '${fileName} is a Function');`, - ` //t.deepEqual(${fileName}(args..), 'Expected');`, - ` //t.equal(${fileName}(args..), 'Expected');`, - ` //t.false(${fileName}(args..), 'Expected');`, - ` //t.throws(${fileName}(args..), 'Expected');`, - ` t.end();`, + `\ntest('${fileName} is a Function', () => {`, + ` expect(${fileName}).toBeInstanceOf(Function);`, `});` ].join('\n'); @@ -90,7 +84,7 @@ snippetFiles }); try { fs.writeFileSync(path.join(TEST_PATH,'testlog'),`Test log for: ${new Date().toString()}\n`); - child_process.execSync(`npm test >> ${TEST_PATH}/testlog`); + childProcess.execSync(`npm test`); } catch (e) { fs.appendFileSync(path.join(TEST_PATH,'testlog')); diff --git a/test/JSONToDate/JSONToDate.test.js b/test/JSONToDate/JSONToDate.test.js index 1e2a7a57b..8a9ca3412 100644 --- a/test/JSONToDate/JSONToDate.test.js +++ b/test/JSONToDate/JSONToDate.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const JSONToDate = require('./JSONToDate.js'); -test('Testing JSONToDate', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof JSONToDate === 'function', 'JSONToDate is a Function'); - //t.deepEqual(JSONToDate(args..), 'Expected'); - //t.equal(JSONToDate(args..), 'Expected'); - //t.false(JSONToDate(args..), 'Expected'); - //t.throws(JSONToDate(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('JSONToDate is a Function', () => { + expect(JSONToDate).toBeInstanceOf(Function); +}); diff --git a/test/JSONToFile/JSONToFile.test.js b/test/JSONToFile/JSONToFile.test.js index 7c352d079..325eface8 100644 --- a/test/JSONToFile/JSONToFile.test.js +++ b/test/JSONToFile/JSONToFile.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const JSONToFile = require('./JSONToFile.js'); -test('Testing JSONToFile', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof JSONToFile === 'function', 'JSONToFile is a Function'); - t.pass('Tested on 09/02/2018 by @chalarangelo'); - //t.deepEqual(JSONToFile(args..), 'Expected'); - //t.equal(JSONToFile(args..), 'Expected'); - //t.false(JSONToFile(args..), 'Expected'); - //t.throws(JSONToFile(args..), 'Expected'); - t.end(); +test('JSONToFile is a Function', () => { + expect(JSONToFile).toBeInstanceOf(Function); }); diff --git a/test/RGBToHex/RGBToHex.test.js b/test/RGBToHex/RGBToHex.test.js index 277d6575c..70892c498 100644 --- a/test/RGBToHex/RGBToHex.test.js +++ b/test/RGBToHex/RGBToHex.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const RGBToHex = require('./RGBToHex.js'); -test('Testing RGBToHex', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof RGBToHex === 'function', 'RGBToHex is a Function'); - t.equal(RGBToHex(255, 165, 1), 'ffa501', "Converts the values of RGB components to a color code."); - //t.deepEqual(RGBToHex(args..), 'Expected'); - //t.equal(RGBToHex(args..), 'Expected'); - //t.false(RGBToHex(args..), 'Expected'); - //t.throws(RGBToHex(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('RGBToHex is a Function', () => { + expect(RGBToHex).toBeInstanceOf(Function); +}); +test('Converts the values of RGB components to a color code.', () => { + expect(RGBToHex(255, 165, 1)).toBe('ffa501'); +}); diff --git a/test/URLJoin/URLJoin.test.js b/test/URLJoin/URLJoin.test.js index 70d0d09a6..4e72b9363 100644 --- a/test/URLJoin/URLJoin.test.js +++ b/test/URLJoin/URLJoin.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const URLJoin = require('./URLJoin.js'); -test('Testing URLJoin', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof URLJoin === 'function', 'URLJoin is a Function'); - t.equal(URLJoin('http://www.google.com', 'a', '/b/cd', '?foo=123', '?bar=foo'), 'http://www.google.com/a/b/cd?foo=123&bar=foo', 'Returns proper URL'); - t.equal(URLJoin('file://www.google.com', 'a', '/b/cd', '?foo=123', '?bar=foo'), 'file:///www.google.com/a/b/cd?foo=123&bar=foo', 'Returns proper URL'); - //t.deepEqual(URLJoin(args..), 'Expected'); - //t.equal(URLJoin(args..), 'Expected'); - //t.false(URLJoin(args..), 'Expected'); - //t.throws(URLJoin(args..), 'Expected'); - t.end(); +test('URLJoin is a Function', () => { + expect(URLJoin).toBeInstanceOf(Function); +}); +test('Returns proper URL', () => { + expect(URLJoin('http://www.google.com', 'a', '/b/cd', '?foo=123', '?bar=foo')).toBe('http://www.google.com/a/b/cd?foo=123&bar=foo'); +}); +test('Returns proper URL', () => { + expect(URLJoin('file://www.google.com', 'a', '/b/cd', '?foo=123', '?bar=foo')).toBe('file:///www.google.com/a/b/cd?foo=123&bar=foo'); }); diff --git a/test/UUIDGeneratorBrowser/UUIDGeneratorBrowser.test.js b/test/UUIDGeneratorBrowser/UUIDGeneratorBrowser.test.js index 255054290..60033da0e 100644 --- a/test/UUIDGeneratorBrowser/UUIDGeneratorBrowser.test.js +++ b/test/UUIDGeneratorBrowser/UUIDGeneratorBrowser.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const UUIDGeneratorBrowser = require('./UUIDGeneratorBrowser.js'); -test('Testing UUIDGeneratorBrowser', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof UUIDGeneratorBrowser === 'function', 'UUIDGeneratorBrowser is a Function'); - t.pass('Tested 09/02/2018 by @chalarangelo'); - //t.deepEqual(UUIDGeneratorBrowser(args..), 'Expected'); - //t.equal(UUIDGeneratorBrowser(args..), 'Expected'); - //t.false(UUIDGeneratorBrowser(args..), 'Expected'); - //t.throws(UUIDGeneratorBrowser(args..), 'Expected'); - t.end(); +test('UUIDGeneratorBrowser is a Function', () => { + expect(UUIDGeneratorBrowser).toBeInstanceOf(Function); }); diff --git a/test/UUIDGeneratorNode/UUIDGeneratorNode.test.js b/test/UUIDGeneratorNode/UUIDGeneratorNode.test.js index 1857e1727..8c3aa4356 100644 --- a/test/UUIDGeneratorNode/UUIDGeneratorNode.test.js +++ b/test/UUIDGeneratorNode/UUIDGeneratorNode.test.js @@ -1,16 +1,13 @@ -const test = require('tape'); +const expect = require('expect'); const UUIDGeneratorNode = require('./UUIDGeneratorNode.js'); -test('Testing UUIDGeneratorNode', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof UUIDGeneratorNode === 'function', 'UUIDGeneratorNode is a Function'); - const uuid = UUIDGeneratorNode(); - t.deepEqual([uuid[8], uuid[13], uuid[18], uuid[23]], ['-', '-', '-', '-'], 'Contains dashes in the proper places'); - t.true(/^[0-9A-Fa-f-]+$/.test(uuid), 'Only contains hexadecimal digits'); - //t.deepEqual(UUIDGeneratorNode(args..), 'Expected'); - //t.equal(UUIDGeneratorNode(args..), 'Expected'); - //t.false(UUIDGeneratorNode(args..), 'Expected'); - //t.throws(UUIDGeneratorNode(args..), 'Expected'); - t.end(); +test('UUIDGeneratorNode is a Function', () => { + expect(UUIDGeneratorNode).toBeInstanceOf(Function); +}); +const uuid = UUIDGeneratorNode(); +test('Contains dashes in the proper places', () => { + expect([uuid[8], uuid[13], uuid[18], uuid[23]]).toEqual(['-', '-', '-', '-']); +}); +test('Only contains hexadecimal digits', () => { + expect(/^[0-9A-Fa-f-]+$/.test(uuid)).toBeTruthy(); }); diff --git a/test/all/all.test.js b/test/all/all.test.js index 60ac82f4a..9c07329df 100644 --- a/test/all/all.test.js +++ b/test/all/all.test.js @@ -1,21 +1,30 @@ -const test = require('tape'); +const expect = require('expect'); const all = require('./all.js'); -test('Testing all', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof all === 'function', 'all is a Function'); - t.true(all([4,1,2,3]), 'Returns true for arrays with no falsey values'); - t.false(all([0,1]), 'Returns false for arrays with 0'); - t.false(all([NaN,1]), 'Returns false for arrays with NaN'); - t.false(all([undefined,1]), 'Returns false for arrays with undefined'); - t.false(all([null,1]), 'Returns false for arrays with null'); - t.false(all(['',1]), 'Returns false for arrays with empty strings'); - t.true(all([4,1,2,3], x => x >= 1), 'Returns true with predicate function'); - t.false(all([0,1], x => x >= 1), 'Returns false with a predicate function'); - //t.deepEqual(all(args..), 'Expected'); - //t.equal(all(args..), 'Expected'); - //t.false(all(args..), 'Expected'); - //t.throws(all(args..), 'Expected'); - t.end(); +test('all is a Function', () => { + expect(all).toBeInstanceOf(Function); +}); +test('Returns true for arrays with no falsey values', () => { + expect(all([4,1,2,3])).toBeTruthy(); +}); +test('Returns false for arrays with 0', () => { + expect(all([0,1])).toBeFalsy(); +}); +test('Returns false for arrays with NaN', () => { + expect(all([NaN,1])).toBeFalsy(); +}); +test('Returns false for arrays with undefined', () => { + expect(all([undefined,1])).toBeFalsy(); +}); +test('Returns false for arrays with null', () => { + expect(all([null,1])).toBeFalsy(); +}); +test('Returns false for arrays with empty strings', () => { + expect(all(['',1])).toBeFalsy(); +}); +test('Returns true with predicate function', () => { + expect(all([4,1,2,3], x => x >= 1)).toBeTruthy(); +}); +test('Returns false with a predicate function', () => { + expect(all([0,1], x => x >= 1)).toBeFalsy(); }); diff --git a/test/any/any.test.js b/test/any/any.test.js index 63399b385..083545c1e 100644 --- a/test/any/any.test.js +++ b/test/any/any.test.js @@ -1,18 +1,21 @@ -const test = require('tape'); +const expect = require('expect'); const any = require('./any.js'); -test('Testing any', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof any === 'function', 'any is a Function'); - t.true(any([0,1,2,3]), 'Returns true for arrays with at least one truthy value'); - t.false(any([0,0]), 'Returns false for arrays with no truthy values'); - t.false(any([NaN,0,undefined,null,'']), 'Returns false for arrays with no truthy values'); - t.true(any([4,1,0,3], x => x >= 1), 'Returns true with predicate function'); - t.false(any([0,1], x => x < 0), 'Returns false with a predicate function'); - //t.deepEqual(any(args..), 'Expected'); - //t.equal(any(args..), 'Expected'); - //t.false(any(args..), 'Expected'); - //t.throws(any(args..), 'Expected'); - t.end(); +test('any is a Function', () => { + expect(any).toBeInstanceOf(Function); +}); +test('Returns true for arrays with at least one truthy value', () => { + expect(any([0,1,2,3])).toBeTruthy(); +}); +test('Returns false for arrays with no truthy values', () => { + expect(any([0,0])).toBeFalsy(); +}); +test('Returns false for arrays with no truthy values', () => { + expect(any([NaN,0,undefined,null,''])).toBeFalsy(); +}); +test('Returns true with predicate function', () => { + expect(any([4,1,0,3], x => x >= 1)).toBeTruthy(); +}); +test('Returns false with a predicate function', () => { + expect(any([0,1], x => x < 0)).toBeFalsy(); }); diff --git a/test/approximatelyEqual/approximatelyEqual.test.js b/test/approximatelyEqual/approximatelyEqual.test.js index 44221aeb8..12cd74a82 100644 --- a/test/approximatelyEqual/approximatelyEqual.test.js +++ b/test/approximatelyEqual/approximatelyEqual.test.js @@ -1,17 +1,18 @@ -const test = require('tape'); +const expect = require('expect'); const approximatelyEqual = require('./approximatelyEqual.js'); -test('Testing approximatelyEqual', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof approximatelyEqual === 'function', 'approximatelyEqual is a Function'); - t.true(approximatelyEqual(Math.PI / 2.0 , 1.5708), 'Works for PI / 2'); - t.true(approximatelyEqual(0.1 + 0.2, 0.3), 'Works for 0.1 + 0.2 === 0.3'); - t.true(approximatelyEqual(0.5, 0.5), 'Works for exactly equal values'); - t.true(approximatelyEqual(0.501, 0.5, 0.1), 'Works for a custom epsilon'); - //t.deepEqual(approximatelyEqual(args..), 'Expected'); - //t.equal(approximatelyEqual(args..), 'Expected'); - //t.false(approximatelyEqual(args..), 'Expected'); - //t.throws(approximatelyEqual(args..), 'Expected'); - t.end(); +test('approximatelyEqual is a Function', () => { + expect(approximatelyEqual).toBeInstanceOf(Function); +}); +test('Works for PI / 2', () => { + expect(approximatelyEqual(Math.PI / 2.0 , 1.5708)).toBeTruthy(); +}); +test('Works for 0.1 + 0.2 === 0.3', () => { + expect(approximatelyEqual(0.1 + 0.2, 0.3)).toBeTruthy(); +}); +test('Works for exactly equal values', () => { + expect(approximatelyEqual(0.5, 0.5)).toBeTruthy(); +}); +test('Works for a custom epsilon', () => { + expect(approximatelyEqual(0.501, 0.5, 0.1)).toBeTruthy(); }); diff --git a/test/arrayToHtmlList/arrayToHtmlList.test.js b/test/arrayToHtmlList/arrayToHtmlList.test.js index 7cb8f4582..07a97dcf8 100644 --- a/test/arrayToHtmlList/arrayToHtmlList.test.js +++ b/test/arrayToHtmlList/arrayToHtmlList.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const arrayToHtmlList = require('./arrayToHtmlList.js'); -test('Testing arrayToHtmlList', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof arrayToHtmlList === 'function', 'arrayToHtmlList is a Function'); - t.pass('Tested by @chalarangelo on 16/02/2018'); - //t.deepEqual(arrayToHtmlList(args..), 'Expected'); - //t.equal(arrayToHtmlList(args..), 'Expected'); - //t.false(arrayToHtmlList(args..), 'Expected'); - //t.throws(arrayToHtmlList(args..), 'Expected'); - t.end(); +test('arrayToHtmlList is a Function', () => { + expect(arrayToHtmlList).toBeInstanceOf(Function); }); diff --git a/test/ary/ary.test.js b/test/ary/ary.test.js index f73c1c40f..e695ca124 100644 --- a/test/ary/ary.test.js +++ b/test/ary/ary.test.js @@ -1,15 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const ary = require('./ary.js'); -test('Testing ary', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof ary === 'function', 'ary is a Function'); - const firstTwoMax = ary(Math.max, 2); - t.deepEquals([[2, 6, 'a'], [8, 4, 6], [10]].map(x => firstTwoMax(...x)), [6, 8, 10], 'Discards arguments with index >=n'); - //t.deepEqual(ary(args..), 'Expected'); - //t.equal(ary(args..), 'Expected'); - //t.false(ary(args..), 'Expected'); - //t.throws(ary(args..), 'Expected'); - t.end(); +test('ary is a Function', () => { + expect(ary).toBeInstanceOf(Function); +}); +const firstTwoMax = ary(Math.max, 2); +test('Discards arguments with index >=n', () => { + expect([[2, 6, 'a'], [8, 4, 6], [10]].map(x => firstTwoMax(...x))).toEqual([6, 8, 10]); }); diff --git a/test/atob/atob.test.js b/test/atob/atob.test.js index 32e3567d5..43c4f1386 100644 --- a/test/atob/atob.test.js +++ b/test/atob/atob.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const atob = require('./atob.js'); -test('Testing atob', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof atob === 'function', 'atob is a Function'); - t.equals(atob('Zm9vYmFy'), 'foobar', 'atob("Zm9vYmFy") equals "foobar"'); - t.equals(atob('Z'), '', 'atob("Z") returns ""'); - //t.deepEqual(atob(args..), 'Expected'); - //t.equal(atob(args..), 'Expected'); - //t.false(atob(args..), 'Expected'); - //t.throws(atob(args..), 'Expected'); - t.end(); +test('atob is a Function', () => { + expect(atob).toBeInstanceOf(Function); +}); +test('atob("Zm9vYmFy") equals "foobar"', () => { + expect(atob('Zm9vYmFy')).toBe('foobar'); +}); +test('atob("Z") returns ""', () => { + expect(atob('Z')).toBe(''); }); diff --git a/test/attempt/attempt.test.js b/test/attempt/attempt.test.js index 557d7af3b..047cfd4e7 100644 --- a/test/attempt/attempt.test.js +++ b/test/attempt/attempt.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const attempt = require('./attempt.js'); -test('Testing attempt', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof attempt === 'function', 'attempt is a Function'); - t.equals(attempt(() => 0), 0, 'Returns a value'); - t.true(attempt(() => {throw new Error();}) instanceof Error, 'Returns an error'); - //t.deepEqual(attempt(args..), 'Expected'); - //t.equal(attempt(args..), 'Expected'); - //t.false(attempt(args..), 'Expected'); - //t.throws(attempt(args..), 'Expected'); - t.end(); +test('attempt is a Function', () => { + expect(attempt).toBeInstanceOf(Function); +}); +test('Returns a value', () => { + expect(attempt(() => 0)).toBe(0); +}); +test('Returns an error', () => { + expect(attempt(() => {throw new Error();})).toBeInstanceOf(Error); }); diff --git a/test/average/average.test.js b/test/average/average.test.js index 16a9471c7..fe042cf36 100644 --- a/test/average/average.test.js +++ b/test/average/average.test.js @@ -1,24 +1,43 @@ -const test = require('tape'); +const expect = require('expect'); const average = require('./average.js'); -test('Testing average', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof average === 'function', 'average is a Function'); - t.true(average(true) === 1, 'average(true) returns 0'); - t.true(average(false) === 0, 'average(false) returns 1'); - t.equal(average(9, 1), 5, 'average(9, 1) returns 5'); - t.equal(average(153, 44, 55, 64, 71, 1122, 322774, 2232, 23423, 234, 3631), 32163.909090909092, 'average(153, 44, 55, 64, 71, 1122, 322774, 2232, 23423, 234, 3631) returns 32163.909090909092 '); - t.equal(average(1, 2, 3), 2, 'average(1, 2, 3) returns 2'); - t.equal(average(null), 0, 'average(null) returns 0'); - t.true(isNaN(average(undefined)), 'average(1, 2, 3) returns NaN'); - t.true(isNaN(average('String')), 'average(String) returns NaN'); - t.true(isNaN(average({ a: 123})), 'average({ a: 123}) returns NaN'); - t.true(isNaN(average([undefined, 0, 'string'])), 'average([undefined, 0, string]) returns NaN'); +test('average is a Function', () => { + expect(average).toBeInstanceOf(Function); +}); +test('average(true) returns 0', () => { + expect(average(true) === 1).toBeTruthy(); +}); +test('average(false) returns 1', () => { + expect(average(false) === 0).toBeTruthy(); +}); +test('average(9, 1) returns 5', () => { + expect(average(9, 1)).toBe(5); +}); +test('average(153, 44, 55, 64, 71, 1122, 322774, 2232, 23423, 234, 3631) returns 32163.909090909092 ', () => { + expect(average(153, 44, 55, 64, 71, 1122, 322774, 2232, 23423, 234, 3631)).toBeCloseTo(32163.909090909092, 3); +}); +test('average(1, 2, 3) returns 2', () => { + expect(average(1, 2, 3)).toBe(2); +}); +test('average(null) returns 0', () => { + expect(average(null)).toBe(0); +}); +test('average(1, 2, 3) returns NaN', () => { + expect(isNaN(average(undefined))).toBeTruthy(); +}); +test('average(String) returns NaN', () => { + expect(isNaN(average('String'))).toBeTruthy(); +}); +test('average({ a: 123}) returns NaN', () => { + expect(isNaN(average({ a: 123}))).toBeTruthy(); +}); +test('average([undefined, 0, string]) returns NaN', () => { + expect(isNaN(average([undefined, 0, 'string']))).toBeTruthy(); +}); - let start = new Date().getTime(); - average(153, 44, 55, 64, 71, 1122, 322774, 2232, 23423, 234, 3631); - let end = new Date().getTime(); - t.true((end - start) < 2000, 'average([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run'); - t.end(); -}); \ No newline at end of file +let start = new Date().getTime(); +average(153, 44, 55, 64, 71, 1122, 322774, 2232, 23423, 234, 3631); +let end = new Date().getTime(); +test('average([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run', () => { + expect((end - start) < 2000).toBeTruthy(); +}); diff --git a/test/averageBy/averageBy.test.js b/test/averageBy/averageBy.test.js index 7c3fabe16..044d407df 100644 --- a/test/averageBy/averageBy.test.js +++ b/test/averageBy/averageBy.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const averageBy = require('./averageBy.js'); -test('Testing averageBy', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof averageBy === 'function', 'averageBy is a Function'); - t.equals(averageBy([{ n: 4 }, { n: 2 }, { n: 8 }, { n: 6 }], o => o.n), 5, 'Produces the right result with a function'); - t.equals(averageBy([{ n: 4 }, { n: 2 }, { n: 8 }, { n: 6 }], 'n'), 5, 'Produces the right result with a property name'); - //t.deepEqual(averageBy(args..), 'Expected'); - //t.equal(averageBy(args..), 'Expected'); - //t.false(averageBy(args..), 'Expected'); - //t.throws(averageBy(args..), 'Expected'); - t.end(); +test('averageBy is a Function', () => { + expect(averageBy).toBeInstanceOf(Function); +}); +test('Produces the right result with a function', () => { + expect(averageBy([{ n: 4 }, { n: 2 }, { n: 8 }, { n: 6 }], o => o.n)).toBe(5); +}); +test('Produces the right result with a property name', () => { + expect(averageBy([{ n: 4 }, { n: 2 }, { n: 8 }, { n: 6 }], 'n')).toBe(5); }); diff --git a/test/bifurcate/bifurcate.test.js b/test/bifurcate/bifurcate.test.js index c65333ee0..456d490cb 100644 --- a/test/bifurcate/bifurcate.test.js +++ b/test/bifurcate/bifurcate.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const bifurcate = require('./bifurcate.js'); -test('Testing bifurcate', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof bifurcate === 'function', 'bifurcate is a Function'); - t.deepEqual(bifurcate([ 'beep', 'boop', 'foo', 'bar' ], [ true, true, false, true ]), [ ['beep', 'boop', 'bar'], ['foo'] ], 'Splits the collection into two groups'); - //t.deepEqual(bifurcate(args..), 'Expected'); - //t.equal(bifurcate(args..), 'Expected'); - //t.false(bifurcate(args..), 'Expected'); - //t.throws(bifurcate(args..), 'Expected'); - t.end(); +test('bifurcate is a Function', () => { + expect(bifurcate).toBeInstanceOf(Function); +}); +test('Splits the collection into two groups', () => { + expect(bifurcate([ 'beep', 'boop', 'foo', 'bar' ], [ true, true, false, true ])).toEqual([ ['beep', 'boop', 'bar'], ['foo'] ]); }); diff --git a/test/bifurcateBy/bifurcateBy.test.js b/test/bifurcateBy/bifurcateBy.test.js index a6c293638..1b01c76e7 100644 --- a/test/bifurcateBy/bifurcateBy.test.js +++ b/test/bifurcateBy/bifurcateBy.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const bifurcateBy = require('./bifurcateBy.js'); -test('Testing bifurcateBy', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof bifurcateBy === 'function', 'bifurcateBy is a Function'); - t.deepEqual(bifurcateBy([ 'beep', 'boop', 'foo', 'bar' ], x => x[0] === 'b'), [ ['beep', 'boop', 'bar'], ['foo'] ], 'Splits the collection into two groups'); - //t.deepEqual(bifurcateBy(args..), 'Expected'); - //t.equal(bifurcateBy(args..), 'Expected'); - //t.false(bifurcateBy(args..), 'Expected'); - //t.throws(bifurcateBy(args..), 'Expected'); - t.end(); +test('bifurcateBy is a Function', () => { + expect(bifurcateBy).toBeInstanceOf(Function); +}); +test('Splits the collection into two groups', () => { + expect(bifurcateBy([ 'beep', 'boop', 'foo', 'bar' ], x => x[0] === 'b')).toEqual([ ['beep', 'boop', 'bar'], ['foo'] ]); }); diff --git a/test/binarySearch/binarySearch.test.js b/test/binarySearch/binarySearch.test.js index e1a53283d..a00680bb6 100644 --- a/test/binarySearch/binarySearch.test.js +++ b/test/binarySearch/binarySearch.test.js @@ -1,16 +1,18 @@ -const test = require('tape'); +const expect = require('expect'); const binarySearch = require('./binarySearch.js'); -test('Testing binarySearch', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof binarySearch === 'function', 'binarySearch is a Function'); - //t.deepEqual(binarySearch(args..), 'Expected'); - t.equal(binarySearch([1, 4, 6, 7, 12, 13, 15, 18, 19, 20, 22, 24], 6), 2, 'Finds item in array'); - t.equal(binarySearch([1, 4, 6, 7, 12, 13, 15, 18, 19, 20, 22, 24], 21), -1, 'Returns -1 when not found'); - t.equal(binarySearch([], 21), -1, 'Works with empty arrays'); - t.equal(binarySearch([1], 1), 0, "Works for one element arrays"); - //t.false(binarySearch(args..), 'Expected'); - //t.throws(binarySearch(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('binarySearch is a Function', () => { + expect(binarySearch).toBeInstanceOf(Function); +}); +test('Finds item in array', () => { + expect(binarySearch([1, 4, 6, 7, 12, 13, 15, 18, 19, 20, 22, 24], 6)).toBe(2); +}); +test('Returns -1 when not found', () => { + expect(binarySearch([1, 4, 6, 7, 12, 13, 15, 18, 19, 20, 22, 24], 21)).toBe(-1); +}); +test('Works with empty arrays', () => { + expect(binarySearch([], 21)).toBe(-1); +}); +test('Works for one element arrays', () => { + expect(binarySearch([1], 1)).toBe(0); +}); diff --git a/test/bind/bind.test.js b/test/bind/bind.test.js index e3ba1054c..423b2b8d9 100644 --- a/test/bind/bind.test.js +++ b/test/bind/bind.test.js @@ -1,19 +1,14 @@ -const test = require('tape'); +const expect = require('expect'); const bind = require('./bind.js'); -test('Testing bind', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof bind === 'function', 'bind is a Function'); - function greet(greeting, punctuation) { - return greeting + ' ' + this.user + punctuation; - } - const freddy = { user: 'fred' }; - const freddyBound = bind(greet, freddy); - t.equals(freddyBound('hi', '!'),'hi fred!', 'Binds to an object context'); - //t.deepEqual(bind(args..), 'Expected'); - //t.equal(bind(args..), 'Expected'); - //t.false(bind(args..), 'Expected'); - //t.throws(bind(args..), 'Expected'); - t.end(); +test('bind is a Function', () => { + expect(bind).toBeInstanceOf(Function); +}); +function greet(greeting, punctuation) { + return greeting + ' ' + this.user + punctuation; +} +const freddy = { user: 'fred' }; +const freddyBound = bind(greet, freddy); +test('Binds to an object context', () => { + expect(freddyBound('hi', '!')).toBe('hi fred!'); }); diff --git a/test/bindAll/bindAll.test.js b/test/bindAll/bindAll.test.js index 3876982f4..8415c730c 100644 --- a/test/bindAll/bindAll.test.js +++ b/test/bindAll/bindAll.test.js @@ -1,21 +1,16 @@ -const test = require('tape'); +const expect = require('expect'); const bindAll = require('./bindAll.js'); -test('Testing bindAll', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof bindAll === 'function', 'bindAll is a Function'); - var view = { - label: 'docs', - 'click': function() { - return 'clicked ' + this.label; - } - }; - bindAll(view, 'click'); - t.equal(view.click(), 'clicked docs', 'Binds to an object context'); - //t.deepEqual(bindAll(args..), 'Expected'); - //t.equal(bindAll(args..), 'Expected'); - //t.false(bindAll(args..), 'Expected'); - //t.throws(bindAll(args..), 'Expected'); - t.end(); +test('bindAll is a Function', () => { + expect(bindAll).toBeInstanceOf(Function); +}); +var view = { + label: 'docs', + 'click': function() { + return 'clicked ' + this.label; + } +}; +bindAll(view, 'click'); +test('Binds to an object context', () => { + expect(view.click()).toBe('clicked docs'); }); diff --git a/test/bindKey/bindKey.test.js b/test/bindKey/bindKey.test.js index 2aed1fb1e..cce1b4c98 100644 --- a/test/bindKey/bindKey.test.js +++ b/test/bindKey/bindKey.test.js @@ -1,21 +1,16 @@ -const test = require('tape'); +const expect = require('expect'); const bindKey = require('./bindKey.js'); -test('Testing bindKey', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof bindKey === 'function', 'bindKey is a Function'); - const freddy = { - user: 'fred', - greet: function(greeting, punctuation) { - return greeting + ' ' + this.user + punctuation; - } - }; - const freddyBound = bindKey(freddy, 'greet'); - t.equal(freddyBound('hi', '!'), 'hi fred!', 'Binds function to an object context'); - //t.deepEqual(bindKey(args..), 'Expected'); - //t.equal(bindKey(args..), 'Expected'); - //t.false(bindKey(args..), 'Expected'); - //t.throws(bindKey(args..), 'Expected'); - t.end(); +test('bindKey is a Function', () => { + expect(bindKey).toBeInstanceOf(Function); +}); +const freddy = { + user: 'fred', + greet: function(greeting, punctuation) { + return greeting + ' ' + this.user + punctuation; + } +}; +const freddyBound = bindKey(freddy, 'greet'); +test('Binds function to an object context', () => { + expect(freddyBound('hi', '!')).toBe('hi fred!'); }); diff --git a/test/binomialCoefficient/binomialCoefficient.test.js b/test/binomialCoefficient/binomialCoefficient.test.js index 2f0e8ab20..e4ca4f3ce 100644 --- a/test/binomialCoefficient/binomialCoefficient.test.js +++ b/test/binomialCoefficient/binomialCoefficient.test.js @@ -1,18 +1,21 @@ -const test = require('tape'); +const expect = require('expect'); const binomialCoefficient = require('./binomialCoefficient.js'); -test('Testing binomialCoefficient', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof binomialCoefficient === 'function', 'binomialCoefficient is a Function'); - t.equal(binomialCoefficient(8, 2), 28, 'Returns the appropriate value'); - t.equal(binomialCoefficient(0, 0), 1, 'Returns the appropriate value'); - t.equal(binomialCoefficient(5, 3), 10, 'Returns the appropriate value'); - t.true(Number.isNaN(binomialCoefficient(NaN, 3)), 'Returns NaN'); - t.true(Number.isNaN(binomialCoefficient(5, NaN)), 'Returns NaN'); - //t.deepEqual(binomialCoefficient(args..), 'Expected'); - //t.equal(binomialCoefficient(args..), 'Expected'); - //t.false(binomialCoefficient(args..), 'Expected'); - //t.throws(binomialCoefficient(args..), 'Expected'); - t.end(); +test('binomialCoefficient is a Function', () => { + expect(binomialCoefficient).toBeInstanceOf(Function); +}); +test('Returns the appropriate value', () => { + expect(binomialCoefficient(8, 2)).toBe(28); +}); +test('Returns the appropriate value', () => { + expect(binomialCoefficient(0, 0)).toBe(1); +}); +test('Returns the appropriate value', () => { + expect(binomialCoefficient(5, 3)).toBe(10); +}); +test('Returns NaN', () => { + expect(Number.isNaN(binomialCoefficient(NaN, 3))).toBeTruthy(); +}); +test('Returns NaN', () => { + expect(Number.isNaN(binomialCoefficient(5, NaN))).toBeTruthy(); }); diff --git a/test/bottomVisible/bottomVisible.test.js b/test/bottomVisible/bottomVisible.test.js index b9be1fc89..6769b3cbd 100644 --- a/test/bottomVisible/bottomVisible.test.js +++ b/test/bottomVisible/bottomVisible.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const bottomVisible = require('./bottomVisible.js'); -test('Testing bottomVisible', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof bottomVisible === 'function', 'bottomVisible is a Function'); - t.pass('Tested on 09/02/2018 by @chalarangelo'); - //t.deepEqual(bottomVisible(args..), 'Expected'); - //t.equal(bottomVisible(args..), 'Expected'); - //t.false(bottomVisible(args..), 'Expected'); - //t.throws(bottomVisible(args..), 'Expected'); - t.end(); +test('bottomVisible is a Function', () => { + expect(bottomVisible).toBeInstanceOf(Function); }); diff --git a/test/btoa/btoa.test.js b/test/btoa/btoa.test.js index 85690e99b..36b740293 100644 --- a/test/btoa/btoa.test.js +++ b/test/btoa/btoa.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const btoa = require('./btoa.js'); -test('Testing btoa', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof btoa === 'function', 'btoa is a Function'); - t.equals(btoa('foobar'), 'Zm9vYmFy', 'btoa("foobar") equals "Zm9vYmFy"'); - //t.deepEqual(btoa(args..), 'Expected'); - //t.equal(btoa(args..), 'Expected'); - //t.false(btoa(args..), 'Expected'); - //t.throws(btoa(args..), 'Expected'); - t.end(); +test('btoa is a Function', () => { + expect(btoa).toBeInstanceOf(Function); +}); +test('btoa("foobar") equals "Zm9vYmFy"', () => { + expect(btoa('foobar')).toBe('Zm9vYmFy'); }); diff --git a/test/byteSize/byteSize.test.js b/test/byteSize/byteSize.test.js index 423c63ce4..ad6371480 100644 --- a/test/byteSize/byteSize.test.js +++ b/test/byteSize/byteSize.test.js @@ -1,5 +1,4 @@ -const test = require('tape'); -// Custom implementation of Blob for the requirements of this snippet. +const expect = require('expect'); const Blob = class{ constructor(s) { return { @@ -7,24 +6,17 @@ const Blob = class{ }; } }; -// const byteSize = require('./byteSize.js'); -// Override const byteSize = str => new Blob([str]).size; -test('Testing byteSize', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof byteSize === 'function', 'byteSize is a Function'); - t.equal(byteSize('a'), 1, 'Works for a single letter'); - t.equal(byteSize('Hello World'), 11, 'Works for a common string'); - t.equal(byteSize('😀'), 4, 'Works for emoji'); - // Blob is not part of Node apparently? - //t.equal(byteSize('Hello World'), 11, 'Works for text'); - //t.equal(byteSize('😀'), 4, 'Works for emojis'); - // Works only in browser - // t.equal(byteSize('Hello World'), 11, "Returns the length of a string in bytes"); - //t.deepEqual(byteSize(args..), 'Expected'); - //t.equal(byteSize(args..), 'Expected'); - //t.false(byteSize(args..), 'Expected'); - //t.throws(byteSize(args..), 'Expected'); - t.end(); + +test('byteSize is a Function', () => { + expect(byteSize).toBeInstanceOf(Function); +}); +test('Works for a single letter', () => { + expect(byteSize('a')).toBe(1); +}); +test('Works for a common string', () => { + expect(byteSize('Hello World')).toBe(11); +}); +test('Works for emoji', () => { + expect(byteSize('😀')).toBe(4); }); diff --git a/test/call/call.test.js b/test/call/call.test.js index bf1ed5e56..a90669ddf 100644 --- a/test/call/call.test.js +++ b/test/call/call.test.js @@ -1,13 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const call = require('./call.js'); -test('Testing call', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof call === 'function', 'call is a Function'); - //t.deepEqual(call(args..), 'Expected'); - t.looseEqual(call('map', x => x * 2)([1, 2, 3]), [2, 4, 6], 'Calls function on given object'); - //t.false(call(args..), 'Expected'); - //t.throws(call(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('call is a Function', () => { + expect(call).toBeInstanceOf(Function); +}); +test('Calls function on given object', () => { + expect(call('map', x => x * 2)([1, 2, 3])).toEqual([2, 4, 6]); +}); diff --git a/test/capitalize/capitalize.test.js b/test/capitalize/capitalize.test.js index 9a19686af..68fe363e7 100644 --- a/test/capitalize/capitalize.test.js +++ b/test/capitalize/capitalize.test.js @@ -1,17 +1,18 @@ -const test = require('tape'); +const expect = require('expect'); const capitalize = require('./capitalize.js'); -test('Testing capitalize', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof capitalize === 'function', 'capitalize is a Function'); - t.equal(capitalize('fooBar'), 'FooBar', "Capitalizes the first letter of a string"); - t.equal(capitalize('fooBar', true), 'Foobar', "Capitalizes the first letter of a string"); - t.equal(capitalize('#!#', true), '#!#', "Works with characters"); - t.equal(capitalize('a', true), 'A', "Works with single character words"); - //t.deepEqual(capitalize(args..), 'Expected'); - //t.equal(capitalize(args..), 'Expected'); - //t.false(capitalize(args..), 'Expected'); - //t.throws(capitalize(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('capitalize is a Function', () => { + expect(capitalize).toBeInstanceOf(Function); +}); +test('Capitalizes the first letter of a string', () => { + expect(capitalize('fooBar')).toBe('FooBar'); +}); +test('Capitalizes the first letter of a string', () => { + expect(capitalize('fooBar', true)).toBe('Foobar'); +}); +test('Works with characters', () => { + expect(capitalize('#!#', true)).toBe('#!#'); +}); +test('"Works with single character words', () => { + expect(capitalize('a', true)).toBe('A'); +}); diff --git a/test/capitalizeEveryWord/capitalizeEveryWord.test.js b/test/capitalizeEveryWord/capitalizeEveryWord.test.js index 5ea7eb4d7..a57e2619d 100644 --- a/test/capitalizeEveryWord/capitalizeEveryWord.test.js +++ b/test/capitalizeEveryWord/capitalizeEveryWord.test.js @@ -1,16 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const capitalizeEveryWord = require('./capitalizeEveryWord.js'); -test('Testing capitalizeEveryWord', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof capitalizeEveryWord === 'function', 'capitalizeEveryWord is a Function'); - t.equal(capitalizeEveryWord('hello world!'), 'Hello World!', "Capitalizes the first letter of every word in a string"); - t.equal(capitalizeEveryWord('$# @!'), '$# @!', "Works with characters"); - t.equal(capitalizeEveryWord('a'), 'A', "Works with one word string"); - //t.deepEqual(capitalizeEveryWord(args..), 'Expected'); - //t.equal(capitalizeEveryWord(args..), 'Expected'); - //t.false(capitalizeEveryWord(args..), 'Expected'); - //t.throws(capitalizeEveryWord(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('capitalizeEveryWord is a Function', () => { + expect(capitalizeEveryWord).toBeInstanceOf(Function); +}); +test('Capitalizes the first letter of every word in a string', () => { + expect(capitalizeEveryWord('hello world!')).toBe('Hello World!'); +}); +test('Works with characters', () => { + expect(capitalizeEveryWord('$# @!')).toBe('$# @!'); +}); +test('Works with one word string', () => { + expect(capitalizeEveryWord('a')).toBe('A'); +}); diff --git a/test/castArray/castArray.test.js b/test/castArray/castArray.test.js index a0961a491..246a8cd48 100644 --- a/test/castArray/castArray.test.js +++ b/test/castArray/castArray.test.js @@ -1,18 +1,21 @@ -const test = require('tape'); +const expect = require('expect'); const castArray = require('./castArray.js'); -test('Testing castArray', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof castArray === 'function', 'castArray is a Function'); - t.deepEqual(castArray(1), [1], 'Works for single values'); - t.deepEqual(castArray([1]), [1], 'Works for arrays with one value'); - t.deepEqual(castArray([1,2,3]), [1,2,3], 'Works for arrays with multiple value'); - t.deepEqual(castArray('test'), ['test'], 'Works for strings'); - t.deepEqual(castArray({}), [{}], 'Works for objects'); - //t.deepEqual(castArray(args..), 'Expected'); - //t.equal(castArray(args..), 'Expected'); - //t.false(castArray(args..), 'Expected'); - //t.throws(castArray(args..), 'Expected'); - t.end(); +test('castArray is a Function', () => { + expect(castArray).toBeInstanceOf(Function); +}); +test('Works for single values', () => { + expect(castArray(1)).toEqual([1]); +}); +test('Works for arrays with one value', () => { + expect(castArray([1])).toEqual([1]); +}); +test('Works for arrays with multiple value', () => { + expect(castArray([1,2,3])).toEqual( [1,2,3]); +}); +test('Works for strings', () => { + expect(castArray('test')).toEqual(['test']); +}); +test('Works for objects', () => { + expect(castArray({})).toEqual([{}]); }); diff --git a/test/chainAsync/chainAsync.test.js b/test/chainAsync/chainAsync.test.js index a1e6edd06..9d69ef316 100644 --- a/test/chainAsync/chainAsync.test.js +++ b/test/chainAsync/chainAsync.test.js @@ -1,10 +1,11 @@ -const test = require('tape'); +const expect = require('expect'); const chainAsync = require('./chainAsync.js'); -test('Testing chainAsync', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof chainAsync === 'function', 'chainAsync is a Function'); +test('chainAsync is a Function', () => { + expect(chainAsync).toBeInstanceOf(Function); +}); + +test('Calls all functions in an array', () => { chainAsync([ next => { next(); @@ -15,13 +16,7 @@ test('Testing chainAsync', (t) => { })(); }, next => { - t.pass("Calls all functions in an array"); + expect(true).toBeTruthy(); } ]); - // // Ensure we wait for the 2nd assertion to be made - // t.plan(2); - - //t.false(chainAsync(args..), 'Expected'); - //t.throws(chainAsync(args..), 'Expected'); - t.end(); }); diff --git a/test/chunk/chunk.test.js b/test/chunk/chunk.test.js index bd5c5334c..0509cdd6a 100644 --- a/test/chunk/chunk.test.js +++ b/test/chunk/chunk.test.js @@ -1,22 +1,36 @@ -const test = require('tape'); +const expect = require('expect'); const chunk = require('./chunk.js'); -test('Testing chunk', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof chunk === 'function', 'chunk is a Function'); - t.deepEqual(chunk([1, 2, 3, 4, 5], 2), [[1,2],[3,4],[5]], "chunk([1, 2, 3, 4, 5], 2) returns [[1,2],[3,4],[5]] "); - t.deepEqual(chunk([]), [], 'chunk([]) returns []'); - t.deepEqual(chunk(123), [], 'chunk(123) returns []'); - t.deepEqual(chunk({ a: 123}), [], 'chunk({ a: 123}) returns []'); - t.deepEqual(chunk('string', 2), [ 'st', 'ri', 'ng' ], 'chunk(string, 2) returns [ st, ri, ng ]'); - t.throws(() => chunk(), 'chunk() throws an error'); - t.throws(() => chunk(undefined), 'chunk(undefined) throws an error'); - t.throws(() => chunk(null), 'chunk(null) throws an error'); - - let start = new Date().getTime(); - chunk('This is a string', 2); - let end = new Date().getTime(); - t.true((end - start) < 2000, 'chunk(This is a string, 2) takes less than 2s to run'); - t.end(); +test('chunk is a Function', () => { + expect(chunk).toBeInstanceOf(Function); +}); +test('chunk([1, 2, 3, 4, 5], 2) returns [[1,2],[3,4],[5]] ', () => { + expect(chunk([1, 2, 3, 4, 5], 2)).toEqual([[1,2],[3,4],[5]]); +}); +test('chunk([]) returns []', () => { + expect(chunk([])).toEqual([]); +}); +test('chunk(123) returns []', () => { + expect(chunk(123)).toEqual([]); +}); +test('chunk({ a: 123}) returns []', () => { + expect(chunk({ a: 123})).toEqual([]); +}); +test('chunk(string, 2) returns [ st, ri, ng ]', () => { + expect(chunk('string', 2)).toEqual( [ 'st', 'ri', 'ng' ]); +}); +test('chunk() throws an error', () => { + expect(() => {chunk();}).toThrow(); +}); +test('chunk(undefined) throws an error', () => { + expect(() => {chunk(undefined);}).toThrow(); +}); +test('chunk(null) throws an error', () => { + expect(() => {chunk(null);}).toThrow(); +}); +let start = new Date().getTime(); +chunk('This is a string', 2); +let end = new Date().getTime(); +test('chunk(This is a string, 2) takes less than 2s to run', () => { + expect((end - start) < 2000).toBeTruthy(); }); diff --git a/test/clampNumber/clampNumber.test.js b/test/clampNumber/clampNumber.test.js index 0e62c5b8f..828e82a05 100644 --- a/test/clampNumber/clampNumber.test.js +++ b/test/clampNumber/clampNumber.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const clampNumber = require('./clampNumber.js'); -test('Testing clampNumber', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof clampNumber === 'function', 'clampNumber is a Function'); - t.equal(clampNumber(2, 3, 5), 3, "Clamps num within the inclusive range specified by the boundary values a and b"); - //t.deepEqual(clampNumber(args..), 'Expected'); - //t.equal(clampNumber(args..), 'Expected'); - //t.false(clampNumber(args..), 'Expected'); - //t.throws(clampNumber(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('clampNumber is a Function', () => { + expect(clampNumber).toBeInstanceOf(Function); +}); +test('Clamps num within the inclusive range specified by the boundary values a and b', () => { + expect(clampNumber(2, 3, 5)).toBe(3); +}); diff --git a/test/cleanObj/cleanObj.test.js b/test/cleanObj/cleanObj.test.js index db490ed45..9e221f468 100644 --- a/test/cleanObj/cleanObj.test.js +++ b/test/cleanObj/cleanObj.test.js @@ -1,15 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const cleanObj = require('./cleanObj.js'); -test('Testing cleanObj', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof cleanObj === 'function', 'cleanObj is a Function'); - const testObj = { a: 1, b: 2, children: { a: 1, b: 2 } }; - t.deepEqual(cleanObj(testObj, ['a'], 'children'), { a: 1, children : { a: 1}}, "Removes any properties except the ones specified from a JSON object"); - //t.deepEqual(cleanObj(args..), 'Expected'); - //t.equal(cleanObj(args..), 'Expected'); - //t.false(cleanObj(args..), 'Expected'); - //t.throws(cleanObj(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('cleanObj is a Function', () => { + expect(cleanObj).toBeInstanceOf(Function); +}); +const testObj = { a: 1, b: 2, children: { a: 1, b: 2 } }; +test('Removes any properties except the ones specified from a JSON object', () => { + expect(cleanObj(testObj, ['a'], 'children')).toEqual({ a: 1, children : { a: 1}}); +}); diff --git a/test/cloneRegExp/cloneRegExp.test.js b/test/cloneRegExp/cloneRegExp.test.js index 17b2ce8c0..d16147c7a 100644 --- a/test/cloneRegExp/cloneRegExp.test.js +++ b/test/cloneRegExp/cloneRegExp.test.js @@ -1,15 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const cloneRegExp = require('./cloneRegExp.js'); -test('Testing cloneRegExp', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof cloneRegExp === 'function', 'cloneRegExp is a Function'); - const rgTest = /./g; - t.notEqual(cloneRegExp(rgTest), rgTest, 'Clones regular expressions properly'); - //t.deepEqual(cloneRegExp(args..), 'Expected'); - //t.equal(cloneRegExp(args..), 'Expected'); - //t.false(cloneRegExp(args..), 'Expected'); - //t.throws(cloneRegExp(args..), 'Expected'); - t.end(); +test('cloneRegExp is a Function', () => { + expect(cloneRegExp).toBeInstanceOf(Function); +}); +const rgTest = /./g; +test('Clones regular expressions properly', () => { + expect(cloneRegExp(rgTest)).not.toBe(rgTest); }); diff --git a/test/coalesce/coalesce.test.js b/test/coalesce/coalesce.test.js index e32afaf95..05a6a93c0 100644 --- a/test/coalesce/coalesce.test.js +++ b/test/coalesce/coalesce.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const coalesce = require('./coalesce.js'); -test('Testing coalesce', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof coalesce === 'function', 'coalesce is a Function'); - t.deepEqual(coalesce(null, undefined, '', NaN, 'Waldo'), '', "Returns the first non-null/undefined argument"); - //t.deepEqual(coalesce(args..), 'Expected'); - //t.equal(coalesce(args..), 'Expected'); - //t.false(coalesce(args..), 'Expected'); - //t.throws(coalesce(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('coalesce is a Function', () => { + expect(coalesce).toBeInstanceOf(Function); +}); +test('Returns the first non-null/undefined argument', () => { + expect(coalesce(null, undefined, '', NaN, 'Waldo')).toEqual(''); +}); diff --git a/test/coalesceFactory/coalesceFactory.test.js b/test/coalesceFactory/coalesceFactory.test.js index e0651ace2..a2836a57f 100644 --- a/test/coalesceFactory/coalesceFactory.test.js +++ b/test/coalesceFactory/coalesceFactory.test.js @@ -1,15 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const coalesceFactory = require('./coalesceFactory.js'); -test('Testing coalesceFactory', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof coalesceFactory === 'function', 'coalesceFactory is a Function'); - const customCoalesce = coalesceFactory(_ => ![null, undefined, '', NaN].includes(_)); - t.deepEqual(customCoalesce(undefined, null, NaN, '', 'Waldo'), 'Waldo', "Returns a customized coalesce function"); - //t.deepEqual(coalesceFactory(args..), 'Expected'); - //t.equal(coalesceFactory(args..), 'Expected'); - //t.false(coalesceFactory(args..), 'Expected'); - //t.throws(coalesceFactory(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('coalesceFactory is a Function', () => { + expect(coalesceFactory).toBeInstanceOf(Function); +}); +const customCoalesce = coalesceFactory(_ => ![null, undefined, '', NaN].includes(_)); +test('Returns a customized coalesce function', () => { + expect(customCoalesce(undefined, null, NaN, '', 'Waldo')).toEqual('Waldo'); +}); diff --git a/test/collatz/collatz.test.js b/test/collatz/collatz.test.js index 5b177db8d..a4bfa2125 100644 --- a/test/collatz/collatz.test.js +++ b/test/collatz/collatz.test.js @@ -1,24 +1,22 @@ -const test = require('tape'); +const expect = require('expect'); const collatz = require('./collatz.js'); -test('Testing collatz', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof collatz === 'function', 'collatz is a Function'); - //t.deepEqual(collatz(args..), 'Expected'); - t.equal(collatz(8), 4, 'When n is even, divide by 2'); - t.equal(collatz(9), 28, 'When n is odd, times by 3 and add 1'); - +test('collatz is a Function', () => { + expect(collatz).toBeInstanceOf(Function); +}); +test('When n is even, divide by 2', () => { + expect(collatz(8)).toBe(4); +}); +test('When n is odd, times by 3 and add 1', () => { + expect(collatz(9)).toBe(28); +}); +test('Eventually reaches 1', () => { let n = 9; while(true){ if (n === 1){ - t.pass('Eventually reaches 1'); + expect(n).toBe(1); break; } n = collatz(n); } - - //t.false(collatz(args..), 'Expected'); - //t.throws(collatz(args..), 'Expected'); - t.end(); }); diff --git a/test/collectInto/collectInto.test.js b/test/collectInto/collectInto.test.js index 347ccd34a..78b34607f 100644 --- a/test/collectInto/collectInto.test.js +++ b/test/collectInto/collectInto.test.js @@ -1,18 +1,13 @@ -const test = require('tape'); +const expect = require('expect'); const collectInto = require('./collectInto.js'); -test('Testing collectInto', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof collectInto === 'function', 'collectInto is a Function'); - const Pall = collectInto(Promise.all.bind(Promise)); - let p1 = Promise.resolve(1); - let p2 = Promise.resolve(2); - let p3 = new Promise(resolve => setTimeout(resolve, 2000, 3)); - Pall(p1, p2, p3).then(function(val){ t.deepEqual(val, [1,2,3], 'Works with multiple promises');}, function(reason){}); - //t.deepEqual(collectInto(args..), 'Expected'); - //t.equal(collectInto(args..), 'Expected'); - //t.false(collectInto(args..), 'Expected'); - //t.throws(collectInto(args..), 'Expected'); - t.end(); +test('collectInto is a Function', () => { + expect(collectInto).toBeInstanceOf(Function); +}); +const Pall = collectInto(Promise.all.bind(Promise)); +let p1 = Promise.resolve(1); +let p2 = Promise.resolve(2); +let p3 = new Promise(resolve => setTimeout(resolve, 2000, 3)); +test('Works with multiple promises', () => { + Pall(p1, p2, p3).then(function(val){ expect(val).toBe([1,2,3]);}, function(reason){}); }); diff --git a/test/colorize/colorize.test.js b/test/colorize/colorize.test.js index 77666f0ae..73658ae79 100644 --- a/test/colorize/colorize.test.js +++ b/test/colorize/colorize.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const colorize = require('./colorize.js'); -test('Testing colorize', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof colorize === 'function', 'colorize is a Function'); - t.pass('Tested on 09/02/2018 by @chalarangelo'); - //t.deepEqual(colorize(args..), 'Expected'); - //t.equal(colorize(args..), 'Expected'); - //t.false(colorize(args..), 'Expected'); - //t.throws(colorize(args..), 'Expected'); - t.end(); +test('colorize is a Function', () => { + expect(colorize).toBeInstanceOf(Function); }); diff --git a/test/compact/compact.test.js b/test/compact/compact.test.js index 74de02b1b..5fe0ee12e 100644 --- a/test/compact/compact.test.js +++ b/test/compact/compact.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const compact = require('./compact.js'); -test('Testing compact', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof compact === 'function', 'compact is a Function'); - t.deepEqual(compact([0, 1, false, 2, '', 3, 'a', 'e' * 23, NaN, 's', 34]), [ 1, 2, 3, 'a', 's', 34 ], "Removes falsey values from an array"); - //t.deepEqual(compact(args..), 'Expected'); - //t.equal(compact(args..), 'Expected'); - //t.false(compact(args..), 'Expected'); - //t.throws(compact(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('compact is a Function', () => { + expect(compact).toBeInstanceOf(Function); +}); +test('Removes falsey values from an array', () => { + expect(compact([0, 1, false, 2, '', 3, 'a', 'e' * 23, NaN, 's', 34])).toEqual([ 1, 2, 3, 'a', 's', 34 ]); +}); diff --git a/test/compose/compose.test.js b/test/compose/compose.test.js index 87c2ea8bd..5da32630f 100644 --- a/test/compose/compose.test.js +++ b/test/compose/compose.test.js @@ -1,17 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const compose = require('./compose.js'); -test('Testing compose', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof compose === 'function', 'compose is a Function'); - const add5 = x => x + 5; - const multiply = (x, y) => x * y; - const multiplyAndAdd5 = compose(add5, multiply); - t.equal(multiplyAndAdd5(5, 2), 15, "Performs right-to-left function composition"); - //t.deepEqual(compose(args..), 'Expected'); - //t.equal(compose(args..), 'Expected'); - //t.false(compose(args..), 'Expected'); - //t.throws(compose(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('compose is a Function', () => { + expect(compose).toBeInstanceOf(Function); +}); +const add5 = x => x + 5; +const multiply = (x, y) => x * y; +const multiplyAndAdd5 = compose(add5, multiply); +test('Performs right-to-left function composition', () => { + expect(multiplyAndAdd5(5, 2)).toBe(15); +}); diff --git a/test/composeRight/composeRight.test.js b/test/composeRight/composeRight.test.js index c07f7e8a5..02cddf187 100644 --- a/test/composeRight/composeRight.test.js +++ b/test/composeRight/composeRight.test.js @@ -1,17 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const composeRight = require('./composeRight.js'); -test('Testing composeRight', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof composeRight === 'function', 'composeRight is a Function'); - const add = (x, y) => x + y; - const square = x => x * x; - const addAndSquare = composeRight(add, square); - t.equal(addAndSquare(1, 2), 9, "Performs left-to-right function composition"); - //t.deepEqual(composeRight(args..), 'Expected'); - //t.equal(composeRight(args..), 'Expected'); - //t.false(composeRight(args..), 'Expected'); - //t.throws(composeRight(args..), 'Expected'); - t.end(); +test('composeRight is a Function', () => { + expect(composeRight).toBeInstanceOf(Function); +}); +const add = (x, y) => x + y; +const square = x => x * x; +const addAndSquare = composeRight(add, square); +test('Performs left-to-right function composition', () => { + expect(addAndSquare(1, 2)).toBe(9); }); diff --git a/test/converge/converge.test.js b/test/converge/converge.test.js index 73cafbf11..67086df48 100644 --- a/test/converge/converge.test.js +++ b/test/converge/converge.test.js @@ -1,23 +1,20 @@ -const test = require('tape'); +const expect = require('expect'); const converge = require('./converge.js'); -test('Testing converge', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof converge === 'function', 'converge is a Function'); - const average = converge((a, b) => a / b, [ - arr => arr.reduce((a, v) => a + v, 0), - arr => arr.length, - ]); - t.equal(average([1, 2, 3, 4, 5, 6, 7]), 4, 'Produces the average of the array'); - const strangeConcat = converge((a, b) => a + b, [ - x => x.toUpperCase(), - x => x.toLowerCase()] - ); - t.equal(strangeConcat('Yodel'), "YODELyodel", 'Produces the strange concatenation'); - //t.deepEqual(converge(args..), 'Expected'); - //t.equal(converge(args..), 'Expected'); - //t.false(converge(args..), 'Expected'); - //t.throws(converge(args..), 'Expected'); - t.end(); +test('converge is a Function', () => { + expect(converge).toBeInstanceOf(Function); +}); +const average = converge((a, b) => a / b, [ + arr => arr.reduce((a, v) => a + v, 0), + arr => arr.length, +]); +test('Produces the average of the array', () => { + expect(average([1, 2, 3, 4, 5, 6, 7])).toBe(4); +}); +const strangeConcat = converge((a, b) => a + b, [ + x => x.toUpperCase(), + x => x.toLowerCase()] +); +test('Produces the strange concatenation', () => { + expect(strangeConcat('Yodel')).toBe('YODELyodel'); }); diff --git a/test/copyToClipboard/copyToClipboard.test.js b/test/copyToClipboard/copyToClipboard.test.js index 24118be8f..60c18bbb9 100644 --- a/test/copyToClipboard/copyToClipboard.test.js +++ b/test/copyToClipboard/copyToClipboard.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const copyToClipboard = require('./copyToClipboard.js'); -test('Testing copyToClipboard', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof copyToClipboard === 'function', 'copyToClipboard is a Function'); - t.pass('Tested on 09/02/2018 by @chalarangelo'); - //t.deepEqual(copyToClipboard(args..), 'Expected'); - //t.equal(copyToClipboard(args..), 'Expected'); - //t.false(copyToClipboard(args..), 'Expected'); - //t.throws(copyToClipboard(args..), 'Expected'); - t.end(); +test('copyToClipboard is a Function', () => { + expect(copyToClipboard).toBeInstanceOf(Function); }); diff --git a/test/countBy/countBy.test.js b/test/countBy/countBy.test.js index 94296d017..a33769895 100644 --- a/test/countBy/countBy.test.js +++ b/test/countBy/countBy.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const countBy = require('./countBy.js'); -test('Testing countBy', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof countBy === 'function', 'countBy is a Function'); - t.deepEqual(countBy([6.1, 4.2, 6.3], Math.floor), {4: 1, 6: 2}, 'Works for functions'); - t.deepEqual(countBy(['one', 'two', 'three'], 'length'), {3: 2, 5: 1}, 'Works for property names'); - //t.deepEqual(countBy(args..), 'Expected'); - //t.equal(countBy(args..), 'Expected'); - //t.false(countBy(args..), 'Expected'); - //t.throws(countBy(args..), 'Expected'); - t.end(); +test('countBy is a Function', () => { + expect(countBy).toBeInstanceOf(Function); +}); +test('Works for functions', () => { + expect(countBy([6.1, 4.2, 6.3], Math.floor)).toEqual({4: 1, 6: 2}); +}); +test('Works for property names', () => { + expect(countBy(['one', 'two', 'three'], 'length')).toEqual({3: 2, 5: 1}); }); diff --git a/test/countOccurrences/countOccurrences.test.js b/test/countOccurrences/countOccurrences.test.js index 1459d5ae8..f4cfab9b4 100644 --- a/test/countOccurrences/countOccurrences.test.js +++ b/test/countOccurrences/countOccurrences.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const countOccurrences = require('./countOccurrences.js'); -test('Testing countOccurrences', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof countOccurrences === 'function', 'countOccurrences is a Function'); - t.deepEqual(countOccurrences([1, 1, 2, 1, 2, 3], 1), 3, "Counts the occurrences of a value in an array"); - //t.deepEqual(countOccurrences(args..), 'Expected'); - //t.equal(countOccurrences(args..), 'Expected'); - //t.false(countOccurrences(args..), 'Expected'); - //t.throws(countOccurrences(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('countOccurrences is a Function', () => { + expect(countOccurrences).toBeInstanceOf(Function); +}); +test('Counts the occurrences of a value in an array', () => { + expect(countOccurrences([1, 1, 2, 1, 2, 3], 1)).toEqual(3); +}); diff --git a/test/countVowels/countVowels.test.js b/test/countVowels/countVowels.test.js index 98a67a2b1..64a1b0936 100644 --- a/test/countVowels/countVowels.test.js +++ b/test/countVowels/countVowels.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const countVowels = require('./countVowels.js'); -test('Testing countVowels', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof countVowels === 'function', 'countVowels is a Function'); - //t.deepEqual(countVowels(args..), 'Expected'); - //t.equal(countVowels(args..), 'Expected'); - //t.false(countVowels(args..), 'Expected'); - //t.throws(countVowels(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('countVowels is a Function', () => { + expect(countVowels).toBeInstanceOf(Function); +}); diff --git a/test/counter/counter.test.js b/test/counter/counter.test.js index f22689a34..a80d9c0f8 100644 --- a/test/counter/counter.test.js +++ b/test/counter/counter.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const counter = require('./counter.js'); -test('Testing counter', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof counter === 'function', 'counter is a Function'); - //t.deepEqual(counter(args..), 'Expected'); - //t.equal(counter(args..), 'Expected'); - //t.false(counter(args..), 'Expected'); - //t.throws(counter(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('counter is a Function', () => { + expect(counter).toBeInstanceOf(Function); +}); diff --git a/test/createElement/createElement.test.js b/test/createElement/createElement.test.js index 6923ec245..096080d8d 100644 --- a/test/createElement/createElement.test.js +++ b/test/createElement/createElement.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const createElement = require('./createElement.js'); -test('Testing createElement', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof createElement === 'function', 'createElement is a Function'); - t.pass('Tested by @chalarangelo on 16/02/2018'); - //t.deepEqual(createElement(args..), 'Expected'); - //t.equal(createElement(args..), 'Expected'); - //t.false(createElement(args..), 'Expected'); - //t.throws(createElement(args..), 'Expected'); - t.end(); +test('createElement is a Function', () => { + expect(createElement).toBeInstanceOf(Function); }); diff --git a/test/createEventHub/createEventHub.test.js b/test/createEventHub/createEventHub.test.js index 101d07aef..701572373 100644 --- a/test/createEventHub/createEventHub.test.js +++ b/test/createEventHub/createEventHub.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const createEventHub = require('./createEventHub.js'); -test('Testing createEventHub', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof createEventHub === 'function', 'createEventHub is a Function'); - t.pass('Tested by @chalarangelo on 16/02/2018'); - //t.deepEqual(createEventHub(args..), 'Expected'); - //t.equal(createEventHub(args..), 'Expected'); - //t.false(createEventHub(args..), 'Expected'); - //t.throws(createEventHub(args..), 'Expected'); - t.end(); +test('createEventHub is a Function', () => { + expect(createEventHub).toBeInstanceOf(Function); }); diff --git a/test/currentURL/currentURL.test.js b/test/currentURL/currentURL.test.js index e190ad429..779470bde 100644 --- a/test/currentURL/currentURL.test.js +++ b/test/currentURL/currentURL.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const currentURL = require('./currentURL.js'); -test('Testing currentURL', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof currentURL === 'function', 'currentURL is a Function'); - t.pass('Tested by @chalarangelo on 16/02/2018'); - //t.deepEqual(currentURL(args..), 'Expected'); - //t.equal(currentURL(args..), 'Expected'); - //t.false(currentURL(args..), 'Expected'); - //t.throws(currentURL(args..), 'Expected'); - t.end(); +test('currentURL is a Function', () => { + expect(currentURL).toBeInstanceOf(Function); }); diff --git a/test/curry/curry.test.js b/test/curry/curry.test.js index 341b11811..4e7b215f6 100644 --- a/test/curry/curry.test.js +++ b/test/curry/curry.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const curry = require('./curry.js'); -test('Testing curry', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof curry === 'function', 'curry is a Function'); - t.equal(curry(Math.pow)(2)(10), 1024, "curries a Math.pow"); - t.equal(curry(Math.min, 3)(10)(50)(2), 2, "curries a Math.min"); - //t.deepEqual(curry(args..), 'Expected'); - //t.equal(curry(args..), 'Expected'); - //t.false(curry(args..), 'Expected'); - //t.throws(curry(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('curry is a Function', () => { + expect(curry).toBeInstanceOf(Function); +}); +test('curries a Math.pow', () => { + expect(curry(Math.pow)(2)(10)).toBe(1024); +}); +test('curries a Math.min', () => { + expect(curry(Math.min, 3)(10)(50)(2)).toBe(2); +}); diff --git a/test/debounce/debounce.test.js b/test/debounce/debounce.test.js index 867aac93a..b261f5f6d 100644 --- a/test/debounce/debounce.test.js +++ b/test/debounce/debounce.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const debounce = require('./debounce.js'); -test('Testing debounce', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof debounce === 'function', 'debounce is a Function'); - debounce(() => {t.pass('Works as expected');}, 250); - //t.deepEqual(debounce(args..), 'Expected'); - //t.equal(debounce(args..), 'Expected'); - //t.false(debounce(args..), 'Expected'); - //t.throws(debounce(args..), 'Expected'); - t.end(); +test('debounce is a Function', () => { + expect(debounce).toBeInstanceOf(Function); }); +test('Works as expected', () => { + debounce(() => { expect(true).toBeTruthy(); }); +}); diff --git a/test/decapitalize/decapitalize.test.js b/test/decapitalize/decapitalize.test.js index 83bf6b32a..14ca0fa7a 100644 --- a/test/decapitalize/decapitalize.test.js +++ b/test/decapitalize/decapitalize.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const decapitalize = require('./decapitalize.js'); -test('Testing decapitalize', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof decapitalize === 'function', 'decapitalize is a Function'); - t.equal(decapitalize('FooBar'), 'fooBar', 'Works with default parameter'); - t.equal(decapitalize('FooBar', true), 'fOOBAR', 'Works with second parameter set to true'); - //t.deepEqual(decapitalize(args..), 'Expected'); - //t.equal(decapitalize(args..), 'Expected'); - //t.false(decapitalize(args..), 'Expected'); - //t.throws(decapitalize(args..), 'Expected'); - t.end(); +test('decapitalize is a Function', () => { + expect(decapitalize).toBeInstanceOf(Function); +}); +test('Works with default parameter', () => { + expect(decapitalize('FooBar')).toBe('fooBar'); +}); +test('Works with second parameter set to true', () => { + expect(decapitalize('FooBar', true)).toBe('fOOBAR'); }); diff --git a/test/deepClone/deepClone.test.js b/test/deepClone/deepClone.test.js index c2276f6ae..7fdf04e01 100644 --- a/test/deepClone/deepClone.test.js +++ b/test/deepClone/deepClone.test.js @@ -1,21 +1,22 @@ -const test = require('tape'); +const expect = require('expect'); const deepClone = require('./deepClone.js'); -test('Testing deepClone', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof deepClone === 'function', 'deepClone is a Function'); - const a = { foo: 'bar', obj: { a: 1, b: 2 } }; - const b = deepClone(a); - const c = [{foo: "bar"}]; - const d = deepClone(c); - t.notEqual(a, b, 'Shallow cloning works'); - t.notEqual(a.obj, b.obj, 'Deep cloning works'); - t.notEqual(c, d, "Array shallow cloning works"); - t.notEqual(c[0], d[0], "Array deep cloning works"); - //t.deepEqual(deepClone(args..), 'Expected'); - //t.equal(deepClone(args..), 'Expected'); - //t.false(deepClone(args..), 'Expected'); - //t.throws(deepClone(args..), 'Expected'); - t.end(); +test('deepClone is a Function', () => { + expect(deepClone).toBeInstanceOf(Function); +}); +const a = { foo: 'bar', obj: { a: 1, b: 2 } }; +const b = deepClone(a); +const c = [{foo: "bar"}]; +const d = deepClone(c); +test('Shallow cloning works', () => { + expect(a).not.toBe(b); +}); +test('Deep cloning works', () => { + expect(a.obj).not.toBe(b.obj); +}); +test('Array shallow cloning works', () => { + expect(c).not.toBe(d); +}); +test('Array deep cloning works', () => { + expect(c[0]).not.toBe(d[0]); }); diff --git a/test/deepFlatten/deepFlatten.test.js b/test/deepFlatten/deepFlatten.test.js index d6225da28..fdaa404cb 100644 --- a/test/deepFlatten/deepFlatten.test.js +++ b/test/deepFlatten/deepFlatten.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const deepFlatten = require('./deepFlatten.js'); -test('Testing deepFlatten', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof deepFlatten === 'function', 'deepFlatten is a Function'); - t.deepEqual(deepFlatten([1, [2], [[3], 4], 5]), [1, 2, 3, 4, 5], "Deep flattens an array"); - //t.deepEqual(deepFlatten(args..), 'Expected'); - //t.equal(deepFlatten(args..), 'Expected'); - //t.false(deepFlatten(args..), 'Expected'); - //t.throws(deepFlatten(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('deepFlatten is a Function', () => { + expect(deepFlatten).toBeInstanceOf(Function); +}); +test('Deep flattens an array', () => { + expect(deepFlatten([1, [2], [[3], 4], 5])).toEqual( [1, 2, 3, 4, 5]); +}); diff --git a/test/defaults/defaults.test.js b/test/defaults/defaults.test.js index b3c519f9d..6a98064cd 100644 --- a/test/defaults/defaults.test.js +++ b/test/defaults/defaults.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const defaults = require('./defaults.js'); -test('Testing defaults', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof defaults === 'function', 'defaults is a Function'); - t.deepEqual(defaults({ a: 1 }, { b: 2 }, { b: 6 }, { a: 3 }), { a: 1, b: 2 }, 'Assigns default values for undefined properties'); - //t.deepEqual(defaults(args..), 'Expected'); - //t.equal(defaults(args..), 'Expected'); - //t.false(defaults(args..), 'Expected'); - //t.throws(defaults(args..), 'Expected'); - t.end(); +test('defaults is a Function', () => { + expect(defaults).toBeInstanceOf(Function); +}); +test('Assigns default values for undefined properties', () => { + expect(defaults({ a: 1 }, { b: 2 }, { b: 6 }, { a: 3 })).toEqual({ a: 1, b: 2 }); }); diff --git a/test/defer/defer.test.js b/test/defer/defer.test.js index 23e125b90..61f3665f1 100644 --- a/test/defer/defer.test.js +++ b/test/defer/defer.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const defer = require('./defer.js'); -test('Testing defer', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof defer === 'function', 'defer is a Function'); - t.pass('Tested by @chalarangelo on 16/02/2018'); - //t.deepEqual(defer(args..), 'Expected'); - //t.equal(defer(args..), 'Expected'); - //t.false(defer(args..), 'Expected'); - //t.throws(defer(args..), 'Expected'); - t.end(); +test('defer is a Function', () => { + expect(defer).toBeInstanceOf(Function); }); diff --git a/test/degreesToRads/degreesToRads.test.js b/test/degreesToRads/degreesToRads.test.js index 8ec980a10..634140d76 100644 --- a/test/degreesToRads/degreesToRads.test.js +++ b/test/degreesToRads/degreesToRads.test.js @@ -1,15 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const degreesToRads = require('./degreesToRads.js'); -test('Testing degreesToRads', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - const approxeq = (v1,v2, diff = 0.001) => Math.abs(v1 - v2) < diff; // Use to account for rounding errors - t.true(typeof degreesToRads === 'function', 'degreesToRads is a Function'); - t.true(approxeq(degreesToRads(90.0), Math.PI / 2), 'Returns the appropriate value'); - //t.deepEqual(degreesToRads(args..), 'Expected'); - //t.equal(degreesToRads(args..), 'Expected'); - //t.false(degreesToRads(args..), 'Expected'); - //t.throws(degreesToRads(args..), 'Expected'); - t.end(); +// const approxeq = (v1,v2, diff = 0.001) => Math.abs(v1 - v2) < diff; +test('degreesToRads is a Function', () => { + expect(degreesToRads).toBeInstanceOf(Function); +}); +test('Returns the appropriate value', () => { + expect(degreesToRads(90.0)).toBeCloseTo(Math.PI / 2, 3); }); diff --git a/test/delay/delay.test.js b/test/delay/delay.test.js index 8404b3bcb..b43e12552 100644 --- a/test/delay/delay.test.js +++ b/test/delay/delay.test.js @@ -1,20 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const delay = require('./delay.js'); -test('Testing delay', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof delay === 'function', 'delay is a Function'); +test('delay is a Function', () => { + expect(delay).toBeInstanceOf(Function); +}); +test('Works as expecting, passing arguments properly', () => { delay( function(text) { - t.equals(text, 'test', 'Works as expecting, passing arguments properly'); + expect(text).toBe('test'); }, 1000, 'test' ); - //t.deepEqual(delay(args..), 'Expected'); - //t.equal(delay(args..), 'Expected'); - //t.false(delay(args..), 'Expected'); - //t.throws(delay(args..), 'Expected'); - t.end(); }); diff --git a/test/detectDeviceType/detectDeviceType.test.js b/test/detectDeviceType/detectDeviceType.test.js index 9a369fe00..695593771 100644 --- a/test/detectDeviceType/detectDeviceType.test.js +++ b/test/detectDeviceType/detectDeviceType.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const detectDeviceType = require('./detectDeviceType.js'); -test('Testing detectDeviceType', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof detectDeviceType === 'function', 'detectDeviceType is a Function'); - t.pass('Tested on 09/02/2018 by @chalarangelo'); - //t.deepEqual(detectDeviceType(args..), 'Expected'); - //t.equal(detectDeviceType(args..), 'Expected'); - //t.false(detectDeviceType(args..), 'Expected'); - //t.throws(detectDeviceType(args..), 'Expected'); - t.end(); +test('detectDeviceType is a Function', () => { + expect(detectDeviceType).toBeInstanceOf(Function); }); diff --git a/test/difference/difference.test.js b/test/difference/difference.test.js index 17a5b7ba2..4d0f316f0 100644 --- a/test/difference/difference.test.js +++ b/test/difference/difference.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const difference = require('./difference.js'); -test('Testing difference', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof difference === 'function', 'difference is a Function'); - t.deepEqual(difference([1, 2, 3], [1, 2, 4]), [3], "Returns the difference between two arrays"); - //t.deepEqual(difference(args..), 'Expected'); - //t.equal(difference(args..), 'Expected'); - //t.false(difference(args..), 'Expected'); - //t.throws(difference(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('difference is a Function', () => { + expect(difference).toBeInstanceOf(Function); +}); +test('Returns the difference between two arrays', () => { + expect(difference([1, 2, 3], [1, 2, 4])).toEqual([3]); +}); diff --git a/test/differenceBy/differenceBy.test.js b/test/differenceBy/differenceBy.test.js index 36c220cac..6d312b981 100644 --- a/test/differenceBy/differenceBy.test.js +++ b/test/differenceBy/differenceBy.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const differenceBy = require('./differenceBy.js'); -test('Testing differenceBy', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof differenceBy === 'function', 'differenceBy is a Function'); - t.deepEqual(differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor), [1.2], 'Works using a native function and numbers'); - t.deepEqual(differenceBy([{ x: 2 }, { x: 1 }], [{ x: 1 }], v => v.x), [ { x: 2 } ], 'Works with arrow function and objects'); - //t.deepEqual(differenceBy(args..), 'Expected'); - //t.equal(differenceBy(args..), 'Expected'); - //t.false(differenceBy(args..), 'Expected'); - //t.throws(differenceBy(args..), 'Expected'); - t.end(); +test('differenceBy is a Function', () => { + expect(differenceBy).toBeInstanceOf(Function); +}); +test('Works using a native function and numbers', () => { + expect(differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor)).toEqual( [1.2]); +}); +test('Works with arrow function and objects', () => { + expect(differenceBy([{ x: 2 }, { x: 1 }], [{ x: 1 }], v => v.x)).toEqual([ { x: 2 } ]); }); diff --git a/test/differenceWith/differenceWith.test.js b/test/differenceWith/differenceWith.test.js index b3dd65cd5..76865cce2 100644 --- a/test/differenceWith/differenceWith.test.js +++ b/test/differenceWith/differenceWith.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const differenceWith = require('./differenceWith.js'); -test('Testing differenceWith', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof differenceWith === 'function', 'differenceWith is a Function'); - t.deepEqual(differenceWith([1, 1.2, 1.5, 3, 0], [1.9, 3, 0], (a, b) => Math.round(a) === Math.round(b)), [1, 1.2], "Filters out all values from an array"); - //t.deepEqual(differenceWith(args..), 'Expected'); - //t.equal(differenceWith(args..), 'Expected'); - //t.false(differenceWith(args..), 'Expected'); - //t.throws(differenceWith(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('differenceWith is a Function', () => { + expect(differenceWith).toBeInstanceOf(Function); +}); +test('Filters out all values from an array', () => { + expect(differenceWith([1, 1.2, 1.5, 3, 0], [1.9, 3, 0], (a, b) => Math.round(a) === Math.round(b))).toEqual([1, 1.2]); +}); diff --git a/test/digitize/digitize.test.js b/test/digitize/digitize.test.js index 2fb81a471..9bf53102b 100644 --- a/test/digitize/digitize.test.js +++ b/test/digitize/digitize.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const digitize = require('./digitize.js'); -test('Testing digitize', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof digitize === 'function', 'digitize is a Function'); - t.deepEqual(digitize(123), [1, 2, 3], "Converts a number to an array of digits"); - //t.deepEqual(digitize(args..), 'Expected'); - //t.equal(digitize(args..), 'Expected'); - //t.false(digitize(args..), 'Expected'); - //t.throws(digitize(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('digitize is a Function', () => { + expect(digitize).toBeInstanceOf(Function); +}); +test('Converts a number to an array of digits', () => { + expect(digitize(123)).toEqual([1, 2,3]); +}); diff --git a/test/distance/distance.test.js b/test/distance/distance.test.js index 7939c3048..7831be85d 100644 --- a/test/distance/distance.test.js +++ b/test/distance/distance.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const distance = require('./distance.js'); -test('Testing distance', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof distance === 'function', 'distance is a Function'); - t.equals(distance(1, 1, 2, 3), 2.23606797749979, 'Calculates the distance between two points'); - //t.deepEqual(distance(args..), 'Expected'); - //t.equal(distance(args..), 'Expected'); - //t.false(distance(args..), 'Expected'); - //t.throws(distance(args..), 'Expected'); - t.end(); +test('distance is a Function', () => { + expect(distance).toBeInstanceOf(Function); +}); +test('Calculates the distance between two points', () => { + expect(distance(1, 1, 2, 3)).toBeCloseTo(2.23606797749979, 5); }); diff --git a/test/drop/drop.test.js b/test/drop/drop.test.js index 3b20fd1cd..f9cc2f57b 100644 --- a/test/drop/drop.test.js +++ b/test/drop/drop.test.js @@ -1,16 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const drop = require('./drop.js'); -test('Testing drop', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof drop === 'function', 'drop is a Function'); - t.deepEqual(drop([1, 2, 3]), [2,3], 'Works without the last argument'); - t.deepEqual(drop([1, 2, 3], 2), [3], 'Removes appropriate element count as specified'); - t.deepEqual(drop([1, 2, 3], 42), [], 'Empties array given a count greater than length'); - //t.deepEqual(drop(args..), 'Expected'); - //t.equal(drop(args..), 'Expected'); - //t.false(drop(args..), 'Expected'); - //t.throws(drop(args..), 'Expected'); - t.end(); +test('drop is a Function', () => { + expect(drop).toBeInstanceOf(Function); +}); +test('Works without the last argument', () => { + expect(drop([1, 2, 3])).toEqual([2,3]); +}); +test('Removes appropriate element count as specified', () => { + expect(drop([1, 2, 3], 2)).toEqual([3]); +}); +test('Empties array given a count greater than length', () => { + expect(drop([1, 2, 3], 42)).toEqual([]); }); diff --git a/test/dropRight/dropRight.test.js b/test/dropRight/dropRight.test.js index b224b0a47..5f36ec265 100644 --- a/test/dropRight/dropRight.test.js +++ b/test/dropRight/dropRight.test.js @@ -1,16 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const dropRight = require('./dropRight.js'); -test('Testing dropRight', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof dropRight === 'function', 'dropRight is a Function'); - t.deepEqual(dropRight([1, 2, 3]), [1,2], "Returns a new array with n elements removed from the right"); - t.deepEqual(dropRight([1, 2, 3], 2), [1], "Returns a new array with n elements removed from the right"); - t.deepEqual(dropRight([1, 2, 3], 42), [], "Returns a new array with n elements removed from the right"); - //t.deepEqual(dropRight(args..), 'Expected'); - //t.equal(dropRight(args..), 'Expected'); - //t.false(dropRight(args..), 'Expected'); - //t.throws(dropRight(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('dropRight is a Function', () => { + expect(dropRight).toBeInstanceOf(Function); +}); +test('Returns a new array with n elements removed from the right', () => { + expect(dropRight([1, 2, 3])).toEqual([1, 2]); +}); +test('Returns a new array with n elements removed from the right', () => { + expect(dropRight([1, 2, 3], 2)).toEqual([1]); +}); +test('Returns a new array with n elements removed from the right', () => { + expect(dropRight([1, 2, 3], 42)).toEqual([]); +}); diff --git a/test/dropRightWhile/dropRightWhile.test.js b/test/dropRightWhile/dropRightWhile.test.js index 50bba45c3..76cf162d9 100644 --- a/test/dropRightWhile/dropRightWhile.test.js +++ b/test/dropRightWhile/dropRightWhile.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const dropRightWhile = require('./dropRightWhile.js'); -test('Testing dropRightWhile', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof dropRightWhile === 'function', 'dropRightWhile is a Function'); - t.deepEqual(dropRightWhile([1, 2, 3, 4], n => n < 3), [1, 2], 'Removes elements from the end of an array until the passed function returns true.'); - //t.deepEqual(dropRightWhile(args..), 'Expected'); - //t.equal(dropRightWhile(args..), 'Expected'); - //t.false(dropRightWhile(args..), 'Expected'); - //t.throws(dropRightWhile(args..), 'Expected'); - t.end(); +test('dropRightWhile is a Function', () => { + expect(dropRightWhile).toBeInstanceOf(Function); +}); +test('Removes elements from the end of an array until the passed function returns true.', () => { + expect(dropRightWhile([1, 2, 3, 4], n => n < 3)).toEqual([1, 2]); }); diff --git a/test/dropWhile/dropWhile.test.js b/test/dropWhile/dropWhile.test.js index 0bbc55024..19aa31470 100644 --- a/test/dropWhile/dropWhile.test.js +++ b/test/dropWhile/dropWhile.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const dropWhile = require('./dropWhile.js'); -test('Testing dropWhile', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof dropWhile === 'function', 'dropWhile is a Function'); - t.deepEqual(dropWhile([1, 2, 3, 4], n => n >= 3), [3,4], 'Removes elements in an array until the passed function returns true.'); - //t.deepEqual(dropWhile(args..), 'Expected'); - //t.equal(dropWhile(args..), 'Expected'); - //t.false(dropWhile(args..), 'Expected'); - //t.throws(dropWhile(args..), 'Expected'); - t.end(); +test('dropWhile is a Function', () => { + expect(dropWhile).toBeInstanceOf(Function); +}); +test('Removes elements in an array until the passed function returns true.', () => { + expect(dropWhile([1, 2, 3, 4], n => n >= 3)).toEqual([3,4]); }); diff --git a/test/elementIsVisibleInViewport/elementIsVisibleInViewport.test.js b/test/elementIsVisibleInViewport/elementIsVisibleInViewport.test.js index a2b4b7a59..f3d70a2fd 100644 --- a/test/elementIsVisibleInViewport/elementIsVisibleInViewport.test.js +++ b/test/elementIsVisibleInViewport/elementIsVisibleInViewport.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const elementIsVisibleInViewport = require('./elementIsVisibleInViewport.js'); -test('Testing elementIsVisibleInViewport', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof elementIsVisibleInViewport === 'function', 'elementIsVisibleInViewport is a Function'); - t.pass('Tested on 09/02/2018 by @chalarangelo'); - //t.deepEqual(elementIsVisibleInViewport(args..), 'Expected'); - //t.equal(elementIsVisibleInViewport(args..), 'Expected'); - //t.false(elementIsVisibleInViewport(args..), 'Expected'); - //t.throws(elementIsVisibleInViewport(args..), 'Expected'); - t.end(); +test('elementIsVisibleInViewport is a Function', () => { + expect(elementIsVisibleInViewport).toBeInstanceOf(Function); }); diff --git a/test/elo/elo.test.js b/test/elo/elo.test.js index c7f757a8e..a5e146384 100644 --- a/test/elo/elo.test.js +++ b/test/elo/elo.test.js @@ -1,16 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const elo = require('./elo.js'); -test('Testing elo', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof elo === 'function', 'elo is a Function'); - t.deepEqual(elo([1200, 1200]), [1216, 1184], "Standard 1v1s"); - t.deepEqual(elo([1200, 1200], 64), [1232, 1168]), "Standard 1v1s"; - t.deepEqual(elo([1200, 1200, 1200, 1200]).map(Math.round), [1246, 1215, 1185, 1154], "4 player FFA, all same rank"); - //t.deepEqual(elo(args..), 'Expected'); - //t.equal(elo(args..), 'Expected'); - //t.false(elo(args..), 'Expected'); - //t.throws(elo(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('elo is a Function', () => { + expect(elo).toBeInstanceOf(Function); +}); +test('Standard 1v1s', () => { + expect(elo([1200, 1200])).toEqual([1216,1184]); +}); +test('Standard 1v1s' ,() => { + expect(elo([1200, 1200], 64)).toEqual([1232, 1168]); +}); +test('4 player FFA, all same rank', () => { + expect(elo([1200, 1200, 1200, 1200]).map(Math.round)).toEqual([1246, 1215, 1185, 1154]); +}); diff --git a/test/equals/equals.test.js b/test/equals/equals.test.js index fd7f0e8f4..4d40b9b63 100644 --- a/test/equals/equals.test.js +++ b/test/equals/equals.test.js @@ -1,18 +1,21 @@ -const test = require('tape'); +const expect = require('expect'); const equals = require('./equals.js'); -test('Testing equals', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof equals === 'function', 'equals is a Function'); - t.true(equals({ a: [2, {e: 3}], b: [4], c: 'foo' }, { a: [2, {e: 3}], b: [4], c: 'foo' }), "{ a: [2, {e: 3}], b: [4], c: 'foo' } is equal to { a: [2, {e: 3}], b: [4], c: 'foo' }"); - t.true(equals([1, 2, 3], [1, 2, 3]), '[1,2,3] is equal to [1,2,3]'); - t.false(equals({ a: [2, 3], b: [4] }, { a: [2, 3], b: [6] }), '{ a: [2, 3], b: [4] } is not equal to { a: [2, 3], b: [6] }'); - t.false(equals([1, 2, 3], [1, 2, 4]), '[1,2,3] is not equal to [1,2,4]'); - t.true(equals([1, 2, 3], { 0: 1, 1: 2, 2: 3 }), '[1, 2, 3] should be equal to { 0: 1, 1: 2, 2: 3 }) - type is different, but their enumerable properties match.'); - //t.deepEqual(equals(args..), 'Expected'); - //t.equal(equals(args..), 'Expected'); - //t.false(equals(args..), 'Expected'); - //t.throws(equals(args..), 'Expected'); - t.end(); +test('equals is a Function', () => { + expect(equals).toBeInstanceOf(Function); +}); +test('{ a: [2, {e: 3}], b: [4], c: \'foo\' } is equal to { a: [2, {e: 3}], b: [4], c: \'foo\' }', () => { + expect(equals({ a: [2, {e: 3}], b: [4], c: 'foo' }, { a: [2, {e: 3}], b: [4], c: 'foo' })).toBeTruthy(); +}); +test('[1,2,3] is equal to [1,2,3]', () => { + expect(equals([1, 2, 3], [1, 2, 3])).toBeTruthy(); +}); +test('{ a: [2, 3], b: [4] } is not equal to { a: [2, 3], b: [6] }', () => { + expect(equals({ a: [2, 3], b: [4] }, { a: [2, 3], b: [6] })).toBeFalsy(); +}); +test('[1,2,3] is not equal to [1,2,4]', () => { + expect(equals([1, 2, 3], [1, 2, 4])).toBeFalsy(); +}); +test('[1, 2, 3] should be equal to { 0: 1, 1: 2, 2: 3 }) - type is different, but their enumerable properties match.', () => { + expect(equals([1, 2, 3], { 0: 1, 1: 2, 2: 3 })).toBeTruthy(); }); diff --git a/test/escapeHTML/escapeHTML.test.js b/test/escapeHTML/escapeHTML.test.js index 642cbfd5b..1865b7cd8 100644 --- a/test/escapeHTML/escapeHTML.test.js +++ b/test/escapeHTML/escapeHTML.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const escapeHTML = require('./escapeHTML.js'); -test('Testing escapeHTML', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof escapeHTML === 'function', 'escapeHTML is a Function'); - t.equal(escapeHTML('Me & you'), '<a href="#">Me & you</a>', "Escapes a string for use in HTML"); - //t.deepEqual(escapeHTML(args..), 'Expected'); - //t.equal(escapeHTML(args..), 'Expected'); - //t.false(escapeHTML(args..), 'Expected'); - //t.throws(escapeHTML(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('escapeHTML is a Function', () => { + expect(escapeHTML).toBeInstanceOf(Function); +}); +test('Escapes a string for use in HTML', () => { + expect(escapeHTML('Me & you')).toBe('<a href="#">Me & you</a>'); +}); diff --git a/test/escapeRegExp/escapeRegExp.test.js b/test/escapeRegExp/escapeRegExp.test.js index 9ecb9497a..bd3f2168f 100644 --- a/test/escapeRegExp/escapeRegExp.test.js +++ b/test/escapeRegExp/escapeRegExp.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const escapeRegExp = require('./escapeRegExp.js'); -test('Testing escapeRegExp', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof escapeRegExp === 'function', 'escapeRegExp is a Function'); - t.equal(escapeRegExp('(test)'), '\\(test\\)', "Escapes a string to use in a regular expression"); - //t.deepEqual(escapeRegExp(args..), 'Expected'); - //t.equal(escapeRegExp(args..), 'Expected'); - //t.false(escapeRegExp(args..), 'Expected'); - //t.throws(escapeRegExp(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('escapeRegExp is a Function', () => { + expect(escapeRegExp).toBeInstanceOf(Function); +}); +test('Escapes a string to use in a regular expression', () => { + expect(escapeRegExp('(test)')).toBe('\\(test\\)'); +}); diff --git a/test/everyNth/everyNth.test.js b/test/everyNth/everyNth.test.js index 53c3851ef..b54958fc7 100644 --- a/test/everyNth/everyNth.test.js +++ b/test/everyNth/everyNth.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const everyNth = require('./everyNth.js'); -test('Testing everyNth', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof everyNth === 'function', 'everyNth is a Function'); - t.deepEqual(everyNth([1, 2, 3, 4, 5, 6], 2), [ 2, 4, 6 ], "Returns every nth element in an array"); - //t.deepEqual(everyNth(args..), 'Expected'); - //t.equal(everyNth(args..), 'Expected'); - //t.false(everyNth(args..), 'Expected'); - //t.throws(everyNth(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('everyNth is a Function', () => { + expect(everyNth).toBeInstanceOf(Function); +}); +test('Returns every nth element in an array', () => { + expect(everyNth([1, 2, 3, 4, 5, 6], 2)).toEqual([ 2, 4, 6 ]); +}); diff --git a/test/extendHex/extendHex.test.js b/test/extendHex/extendHex.test.js index c9fd57973..a31a3c6d2 100644 --- a/test/extendHex/extendHex.test.js +++ b/test/extendHex/extendHex.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const extendHex = require('./extendHex.js'); -test('Testing extendHex', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof extendHex === 'function', 'extendHex is a Function'); - t.equal(extendHex('#03f'), '#0033ff', "Extends a 3-digit color code to a 6-digit color code"); - t.equal(extendHex('05a'), '#0055aa', "Extends a 3-digit color code to a 6-digit color code"); - //t.deepEqual(extendHex(args..), 'Expected'); - //t.equal(extendHex(args..), 'Expected'); - //t.false(extendHex(args..), 'Expected'); - //t.throws(extendHex(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('extendHex is a Function', () => { + expect(extendHex).toBeInstanceOf(Function); +}); +test('Extends a 3-digit color code to a 6-digit color code', () => { + expect(extendHex('#03f')).toBe('#0033ff'); +}); +test('Extends a 3-digit color code to a 6-digit color code', () => { + expect(extendHex('05a')).toBe('#0055aa'); +}); diff --git a/test/factorial/factorial.test.js b/test/factorial/factorial.test.js index d8694b446..130d39a79 100644 --- a/test/factorial/factorial.test.js +++ b/test/factorial/factorial.test.js @@ -1,18 +1,21 @@ -const test = require('tape'); +const expect = require('expect'); const factorial = require('./factorial.js'); -test('Testing factorial', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof factorial === 'function', 'factorial is a Function'); - t.equal(factorial(6), 720, "Calculates the factorial of 720"); - t.equal(factorial(0), 1, "Calculates the factorial of 0"); - t.equal(factorial(1), 1, "Calculates the factorial of 1"); - t.equal(factorial(4), 24, "Calculates the factorial of 4"); - t.equal(factorial(10), 3628800, "Calculates the factorial of 10"); - //t.deepEqual(factorial(args..), 'Expected'); - //t.equal(factorial(args..), 'Expected'); - //t.false(factorial(args..), 'Expected'); - //t.throws(factorial(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('factorial is a Function', () => { + expect(factorial).toBeInstanceOf(Function); +}); +test('Calculates the factorial of 720', () => { + expect(factorial(6)).toBe(720); +}); +test('Calculates the factorial of 0', () => { + expect(factorial(0)).toBe(1); +}); +test('Calculates the factorial of 1', () => { + expect(factorial(1)).toBe(1); +}); +test('Calculates the factorial of 4', () => { + expect(factorial(4)).toBe(24); +}); +test('Calculates the factorial of 10', () => { + expect(factorial(10)).toBe(3628800); +}); diff --git a/test/factors/factors.test.js b/test/factors/factors.test.js index cd9d3a0c9..961098ef4 100644 --- a/test/factors/factors.test.js +++ b/test/factors/factors.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const factors = require('./factors.js'); -test('Testing factors', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof factors === 'function', 'factors is a Function'); - //t.deepEqual(factors(args..), 'Expected'); - //t.equal(factors(args..), 'Expected'); - //t.false(factors(args..), 'Expected'); - //t.throws(factors(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('factors is a Function', () => { + expect(factors).toBeInstanceOf(Function); +}); diff --git a/test/fibonacci/fibonacci.test.js b/test/fibonacci/fibonacci.test.js index 75951a4de..c13d3551b 100644 --- a/test/fibonacci/fibonacci.test.js +++ b/test/fibonacci/fibonacci.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const fibonacci = require('./fibonacci.js'); -test('Testing fibonacci', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof fibonacci === 'function', 'fibonacci is a Function'); - t.deepEqual(fibonacci(6), [0, 1, 1, 2, 3, 5], "Generates an array, containing the Fibonacci sequence"); - //t.deepEqual(fibonacci(args..), 'Expected'); - //t.equal(fibonacci(args..), 'Expected'); - //t.false(fibonacci(args..), 'Expected'); - //t.throws(fibonacci(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('fibonacci is a Function', () => { + expect(fibonacci).toBeInstanceOf(Function); +}); +test('Generates an array, containing the Fibonacci sequence', () => { + expect(fibonacci(6)).toEqual([0, 1, 1, 2, 3, 5]); +}); diff --git a/test/fibonacciCountUntilNum/fibonacciCountUntilNum.test.js b/test/fibonacciCountUntilNum/fibonacciCountUntilNum.test.js index 6d14331d3..249b4ae48 100644 --- a/test/fibonacciCountUntilNum/fibonacciCountUntilNum.test.js +++ b/test/fibonacciCountUntilNum/fibonacciCountUntilNum.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const fibonacciCountUntilNum = require('./fibonacciCountUntilNum.js'); -test('Testing fibonacciCountUntilNum', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof fibonacciCountUntilNum === 'function', 'fibonacciCountUntilNum is a Function'); - //t.deepEqual(fibonacciCountUntilNum(args..), 'Expected'); - //t.equal(fibonacciCountUntilNum(args..), 'Expected'); - //t.false(fibonacciCountUntilNum(args..), 'Expected'); - //t.throws(fibonacciCountUntilNum(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('fibonacciCountUntilNum is a Function', () => { + expect(fibonacciCountUntilNum).toBeInstanceOf(Function); +}); diff --git a/test/fibonacciUntilNum/fibonacciUntilNum.test.js b/test/fibonacciUntilNum/fibonacciUntilNum.test.js index a023c376c..a639afad4 100644 --- a/test/fibonacciUntilNum/fibonacciUntilNum.test.js +++ b/test/fibonacciUntilNum/fibonacciUntilNum.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const fibonacciUntilNum = require('./fibonacciUntilNum.js'); -test('Testing fibonacciUntilNum', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof fibonacciUntilNum === 'function', 'fibonacciUntilNum is a Function'); - //t.deepEqual(fibonacciUntilNum(args..), 'Expected'); - //t.equal(fibonacciUntilNum(args..), 'Expected'); - //t.false(fibonacciUntilNum(args..), 'Expected'); - //t.throws(fibonacciUntilNum(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('fibonacciUntilNum is a Function', () => { + expect(fibonacciUntilNum).toBeInstanceOf(Function); +}); diff --git a/test/filterNonUnique/filterNonUnique.test.js b/test/filterNonUnique/filterNonUnique.test.js index 9fd18bf41..b4ab55867 100644 --- a/test/filterNonUnique/filterNonUnique.test.js +++ b/test/filterNonUnique/filterNonUnique.test.js @@ -1,14 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const filterNonUnique = require('./filterNonUnique.js'); -test('Testing filterNonUnique', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof filterNonUnique === 'function', 'filterNonUnique is a Function'); - t.deepEqual(filterNonUnique([1, 2, 2, 3, 4, 4, 5]), [1,3,5], "Filters out the non-unique values in an array"); - //t.deepEqual(filterNonUnique(args..), 'Expected'); - //t.equal(filterNonUnique(args..), 'Expected'); - //t.false(filterNonUnique(args..), 'Expected'); - //t.throws(filterNonUnique(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('filterNonUnique is a Function', () => { + expect(filterNonUnique).toBeInstanceOf(Function); +}); +test('Filters out the non-unique values in an array', () => { + expect(filterNonUnique([1, 2, 2, 3, 4, 4, 5])).toEqual([1,3, 5]); +}); + diff --git a/test/findKey/findKey.test.js b/test/findKey/findKey.test.js index 7c505e561..54dcc5d33 100644 --- a/test/findKey/findKey.test.js +++ b/test/findKey/findKey.test.js @@ -1,21 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const findKey = require('./findKey.js'); -test('Testing findKey', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof findKey === 'function', 'findKey is a Function'); - t.deepEqual(findKey( +test('findKey is a Function', () => { + expect(findKey).toBeInstanceOf(Function); +}); +test('Returns the appropriate key', () => { + expect(findKey( { barney: { age: 36, active: true }, fred: { age: 40, active: false }, pebbles: { age: 1, active: true } }, - o => o['active'] -), 'barney', 'Returns the appropriate key'); - //t.deepEqual(findKey(args..), 'Expected'); - //t.equal(findKey(args..), 'Expected'); - //t.false(findKey(args..), 'Expected'); - //t.throws(findKey(args..), 'Expected'); - t.end(); + o => o['active'])).toBe('barney'); }); diff --git a/test/findLast/findLast.test.js b/test/findLast/findLast.test.js index a2d74405c..34fa06939 100644 --- a/test/findLast/findLast.test.js +++ b/test/findLast/findLast.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const findLast = require('./findLast.js'); -test('Testing findLast', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof findLast === 'function', 'findLast is a Function'); - t.equal(findLast([1, 2, 3, 4], n => n % 2 === 1), 3, 'Finds last element for which the given function returns true'); - //t.deepEqual(findLast(args..), 'Expected'); - //t.equal(findLast(args..), 'Expected'); - //t.false(findLast(args..), 'Expected'); - //t.throws(findLast(args..), 'Expected'); - t.end(); +test('findLast is a Function', () => { + expect(findLast).toBeInstanceOf(Function); +}); +test('Finds last element for which the given function returns true', () => { + expect(findLast([1, 2, 3, 4], n => n % 2 === 1)).toBe(3); }); diff --git a/test/findLastIndex/findLastIndex.test.js b/test/findLastIndex/findLastIndex.test.js index 2105f977a..6f438daf6 100644 --- a/test/findLastIndex/findLastIndex.test.js +++ b/test/findLastIndex/findLastIndex.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const findLastIndex = require('./findLastIndex.js'); -test('Testing findLastIndex', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof findLastIndex === 'function', 'findLastIndex is a Function'); - t.equal(findLastIndex([1, 2, 3, 4], n => n % 2 === 1), 2, 'Finds last index for which the given function returns true'); - //t.deepEqual(findLastIndex(args..), 'Expected'); - //t.equal(findLastIndex(args..), 'Expected'); - //t.false(findLastIndex(args..), 'Expected'); - //t.throws(findLastIndex(args..), 'Expected'); - t.end(); +test('findLastIndex is a Function', () => { + expect(findLastIndex).toBeInstanceOf(Function); +}); +test('Finds last index for which the given function returns true', () => { + expect(findLastIndex([1, 2, 3, 4], n => n % 2 === 1)).toBe(2); }); diff --git a/test/findLastKey/findLastKey.test.js b/test/findLastKey/findLastKey.test.js index 41bcf3624..434e3e031 100644 --- a/test/findLastKey/findLastKey.test.js +++ b/test/findLastKey/findLastKey.test.js @@ -1,21 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const findLastKey = require('./findLastKey.js'); -test('Testing findLastKey', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof findLastKey === 'function', 'findLastKey is a Function'); - t.equal(findLastKey( +test('findLastKey is a Function', () => { + expect(findLastKey).toBeInstanceOf(Function); +}); +test('eturns the appropriate key', () => { + expect(findLastKey( { barney: { age: 36, active: true }, fred: { age: 40, active: false }, pebbles: { age: 1, active: true } }, - o => o['active'] -), 'pebbles', 'Returns the appropriate key'); - //t.deepEqual(findLastKey(args..), 'Expected'); - //t.equal(findLastKey(args..), 'Expected'); - //t.false(findLastKey(args..), 'Expected'); - //t.throws(findLastKey(args..), 'Expected'); - t.end(); + o => o['active'])).toBe('pebbles'); }); diff --git a/test/flatten/flatten.test.js b/test/flatten/flatten.test.js index eb54b6c19..536a63637 100644 --- a/test/flatten/flatten.test.js +++ b/test/flatten/flatten.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const flatten = require('./flatten.js'); -test('Testing flatten', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof flatten === 'function', 'flatten is a Function'); - t.deepEqual(flatten([1, [2], 3, 4]), [1, 2, 3, 4], "Flattens an array"); - t.deepEqual(flatten([1, [2, [3, [4, 5], 6], 7], 8], 2), [1, 2, 3, [4, 5], 6, 7, 8], "Flattens an array"); - //t.deepEqual(flatten(args..), 'Expected'); - //t.equal(flatten(args..), 'Expected'); - //t.false(flatten(args..), 'Expected'); - //t.throws(flatten(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('flatten is a Function', () => { + expect(flatten).toBeInstanceOf(Function); +}); +test('Flattens an array', () => { + expect(flatten([1, [2], 3, 4])).toEqual([1, 2, 3, 4]); +}); +test('Flattens an array', () => { + expect(flatten([1, [2, [3, [4, 5], 6], 7], 8], 2)).toEqual([1, 2, 3, [4, 5], 6, 7, 8]); +}); diff --git a/test/flattenObject/flattenObject.test.js b/test/flattenObject/flattenObject.test.js index 6fea9f795..8ccafaf3e 100644 --- a/test/flattenObject/flattenObject.test.js +++ b/test/flattenObject/flattenObject.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const flattenObject = require('./flattenObject.js'); -test('Testing flattenObject', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof flattenObject === 'function', 'flattenObject is a Function'); - t.deepEqual(flattenObject({ a: { b: { c: 1 } }, d: 1 }), { 'a.b.c': 1, d: 1 }, 'Flattens an object with the paths for keys'); - t.deepEqual(flattenObject([0,1,[2,[1]],1]), { 0: 0, 1: 1, 3: 1, '2.0': 2, '2.1.0': 1 }, 'Works with arrays'); - //t.deepEqual(flattenObject(args..), 'Expected'); - //t.equal(flattenObject(args..), 'Expected'); - //t.false(flattenObject(args..), 'Expected'); - //t.throws(flattenObject(args..), 'Expected'); - t.end(); +test('flattenObject is a Function', () => { + expect(flattenObject).toBeInstanceOf(Function); +}); +test('Flattens an object with the paths for keys', () => { + expect(flattenObject({ a: { b: { c: 1 } }, d: 1 })).toEqual({ 'a.b.c': 1, d: 1 }); +}); +test('Works with arrays', () => { + expect(flattenObject([0,1,[2,[1]],1])).toEqual({ 0: 0, 1: 1, 3: 1, '2.0': 2, '2.1.0': 1 }); }); diff --git a/test/flip/flip.test.js b/test/flip/flip.test.js index e5cbedefc..26ad46f43 100644 --- a/test/flip/flip.test.js +++ b/test/flip/flip.test.js @@ -1,18 +1,13 @@ -const test = require('tape'); +const expect = require('expect'); const flip = require('./flip.js'); -test('Testing flip', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof flip === 'function', 'flip is a Function'); - let a = { name: 'John Smith' }; - let b = {}; - const mergeFrom = flip(Object.assign); - let mergePerson = mergeFrom.bind(null, a); - t.deepEqual(mergePerson(b), a, 'Flips argument order'); - //t.deepEqual(flip(args..), 'Expected'); - //t.equal(flip(args..), 'Expected'); - //t.false(flip(args..), 'Expected'); - //t.throws(flip(args..), 'Expected'); - t.end(); +test('flip is a Function', () => { + expect(flip).toBeInstanceOf(Function); +}); +let a = { name: 'John Smith' }; +let b = {}; +const mergeFrom = flip(Object.assign); +let mergePerson = mergeFrom.bind(null, a); +test('Flips argument order', () => { + expect(mergePerson(b)).toEqual(a); }); diff --git a/test/forEachRight/forEachRight.test.js b/test/forEachRight/forEachRight.test.js index 2b6b8a956..e137a68e2 100644 --- a/test/forEachRight/forEachRight.test.js +++ b/test/forEachRight/forEachRight.test.js @@ -1,16 +1,11 @@ -const test = require('tape'); +const expect = require('expect'); const forEachRight = require('./forEachRight.js'); -test('Testing forEachRight', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof forEachRight === 'function', 'forEachRight is a Function'); - let output = ''; - forEachRight([1, 2, 3, 4], val => output+=val); - t.equal(output, '4321', 'Iterates over the array in reverse'); - //t.deepEqual(forEachRight(args..), 'Expected'); - //t.equal(forEachRight(args..), 'Expected'); - //t.false(forEachRight(args..), 'Expected'); - //t.throws(forEachRight(args..), 'Expected'); - t.end(); +test('forEachRight is a Function', () => { + expect(forEachRight).toBeInstanceOf(Function); +}); +let output = ''; +forEachRight([1, 2, 3, 4], val => output+=val); +test('Iterates over the array in reverse', () => { + expect(output).toBe('4321'); }); diff --git a/test/forOwn/forOwn.test.js b/test/forOwn/forOwn.test.js index b6910eb1f..74c408c62 100644 --- a/test/forOwn/forOwn.test.js +++ b/test/forOwn/forOwn.test.js @@ -1,16 +1,11 @@ -const test = require('tape'); +const expect = require('expect'); const forOwn = require('./forOwn.js'); -test('Testing forOwn', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof forOwn === 'function', 'forOwn is a Function'); - let output = []; - forOwn({ foo: 'bar', a: 1 }, v => output.push(v)); // 'bar', 1 - t.deepEqual(output, ['bar', 1], 'Iterates over an element\'s key-value pairs'); - //t.deepEqual(forOwn(args..), 'Expected'); - //t.equal(forOwn(args..), 'Expected'); - //t.false(forOwn(args..), 'Expected'); - //t.throws(forOwn(args..), 'Expected'); - t.end(); +test('forOwn is a Function', () => { + expect(forOwn).toBeInstanceOf(Function); +}); +let output = []; +forOwn({ foo: 'bar', a: 1 }, v => output.push(v)); +test('Iterates over an element\'s key-value pairs', () => { + expect(output).toEqual(['bar', 1]); }); diff --git a/test/forOwnRight/forOwnRight.test.js b/test/forOwnRight/forOwnRight.test.js index 66c783785..781d287fe 100644 --- a/test/forOwnRight/forOwnRight.test.js +++ b/test/forOwnRight/forOwnRight.test.js @@ -1,16 +1,11 @@ -const test = require('tape'); +const expect = require('expect'); const forOwnRight = require('./forOwnRight.js'); -test('Testing forOwnRight', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof forOwnRight === 'function', 'forOwnRight is a Function'); - let output = []; - forOwnRight({ foo: 'bar', a: 1 }, v => output.push(v)); // 'bar', 1 - t.deepEqual(output, [1, 'bar'], 'Iterates over an element\'s key-value pairs in reverse'); - //t.deepEqual(forOwnRight(args..), 'Expected'); - //t.equal(forOwnRight(args..), 'Expected'); - //t.false(forOwnRight(args..), 'Expected'); - //t.throws(forOwnRight(args..), 'Expected'); - t.end(); +test('forOwnRight is a Function', () => { + expect(forOwnRight).toBeInstanceOf(Function); +}); +let output = []; +forOwnRight({ foo: 'bar', a: 1 }, v => output.push(v)); +test('Iterates over an element\'s key-value pairs in reverse', () => { + expect(output).toEqual([1, 'bar']); }); diff --git a/test/formatDuration/formatDuration.test.js b/test/formatDuration/formatDuration.test.js index 6c5cc23c3..780ffae26 100644 --- a/test/formatDuration/formatDuration.test.js +++ b/test/formatDuration/formatDuration.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const formatDuration = require('./formatDuration.js'); -test('Testing formatDuration', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof formatDuration === 'function', 'formatDuration is a Function'); - t.equal(formatDuration(1001), '1 second, 1 millisecond', "Returns the human readable format of the given number of milliseconds"); - t.equal(formatDuration(34325055574), '397 days, 6 hours, 44 minutes, 15 seconds, 574 milliseconds', "Returns the human readable format of the given number of milliseconds"); - //t.deepEqual(formatDuration(args..), 'Expected'); - //t.equal(formatDuration(args..), 'Expected'); - //t.false(formatDuration(args..), 'Expected'); - //t.throws(formatDuration(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('formatDuration is a Function', () => { + expect(formatDuration).toBeInstanceOf(Function); +}); +test('Returns the human readable format of the given number of milliseconds', () => { + expect(formatDuration(1001)).toBe('1 second, 1 millisecond'); +}); +test('Returns the human readable format of the given number of milliseconds', () => { + expect(formatDuration(34325055574)).toBe('397 days, 6 hours, 44 minutes, 15 seconds, 574 milliseconds'); +}); diff --git a/test/fromCamelCase/fromCamelCase.test.js b/test/fromCamelCase/fromCamelCase.test.js index 58ecffed9..5491058ac 100644 --- a/test/fromCamelCase/fromCamelCase.test.js +++ b/test/fromCamelCase/fromCamelCase.test.js @@ -1,16 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const fromCamelCase = require('./fromCamelCase.js'); -test('Testing fromCamelCase', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof fromCamelCase === 'function', 'fromCamelCase is a Function'); - t.equal(fromCamelCase('someDatabaseFieldName', ' '), 'some database field name', "Converts a string from camelcase"); - t.equal(fromCamelCase('someLabelThatNeedsToBeCamelized', '-'), 'some-label-that-needs-to-be-camelized', "Converts a string from camelcase"); - t.equal(fromCamelCase('someJavascriptProperty', '_'), 'some_javascript_property', "Converts a string from camelcase"); - //t.deepEqual(fromCamelCase(args..), 'Expected'); - //t.equal(fromCamelCase(args..), 'Expected'); - //t.false(fromCamelCase(args..), 'Expected'); - //t.throws(fromCamelCase(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('fromCamelCase is a Function', () => { + expect(fromCamelCase).toBeInstanceOf(Function); +}); +test('Converts a string from camelcase', () => { + expect(fromCamelCase('someDatabaseFieldName', ' ')).toBe('some database field name'); +}); +test('Converts a string from camelcase', () => { + expect(fromCamelCase('someLabelThatNeedsToBeCamelized', '-')).toBe('some-label-that-needs-to-be-camelized'); +}); +test('Converts a string from camelcase', () => { + expect(fromCamelCase('someJavascriptProperty', '_')).toBe('some_javascript_property'); +}); diff --git a/test/functionName/functionName.test.js b/test/functionName/functionName.test.js index 4231f45c5..91c75a6a4 100644 --- a/test/functionName/functionName.test.js +++ b/test/functionName/functionName.test.js @@ -1,26 +1,18 @@ -const test = require('tape'); -//const functionName = require('./functionName.js'); -// Custom override for console.debug to check output. +const expect = require('expect'); let output = ''; -const console = {}; -console.debug = (x) => output = x; -// Override for testing -const functionName = fn => (console.debug(fn.name), fn); -test('Testing functionName', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof functionName === 'function', 'functionName is a Function'); - functionName(Math.max); - t.equal(output, 'max', 'Works for native functions'); - function fun(x) {return x;} - functionName(fun); - t.equal(output, 'fun', 'Works for functions'); - const fn = x => x; - functionName(fn); - t.equal(output, 'fn', 'Works for arrow functions'); - //t.deepEqual(functionName(args..), 'Expected'); - //t.equal(functionName(args..), 'Expected'); - //t.false(functionName(args..), 'Expected'); - //t.throws(functionName(args..), 'Expected'); - t.end(); +const functionName = fn => fn.name; + +test('functionName is a Function', () => { + expect(functionName).toBeInstanceOf(Function); +}); +test('Works for native functions', () => { + expect(functionName(Math.max)).toBe('max'); +}); +function fun(x) {return x;} +test('Works for functions', () => { + expect(functionName(fun)).toBe('fun'); +}); +const fn = x => x; +test('Works for arrow functions', () => { + expect(functionName(fn)).toBe('fn'); }); diff --git a/test/functions/functions.test.js b/test/functions/functions.test.js index 0177fa60a..b7193bf92 100644 --- a/test/functions/functions.test.js +++ b/test/functions/functions.test.js @@ -1,20 +1,17 @@ -const test = require('tape'); +const expect = require('expect'); const functions = require('./functions.js'); -test('Testing functions', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof functions === 'function', 'functions is a Function'); - function Foo() { - this.a = () => 1; - this.b = () => 2; - } - Foo.prototype.c = () => 3; - t.deepEqual(functions(new Foo()), ['a', 'b'], 'Returns own methods'); - t.deepEqual(functions(new Foo(), true), ['a', 'b', 'c'], 'Returns own and inherited methods'); - //t.deepEqual(functions(args..), 'Expected'); - //t.equal(functions(args..), 'Expected'); - //t.false(functions(args..), 'Expected'); - //t.throws(functions(args..), 'Expected'); - t.end(); +test('functions is a Function', () => { + expect(functions).toBeInstanceOf(Function); +}); +function Foo() { + this.a = () => 1; + this.b = () => 2; +} +Foo.prototype.c = () => 3; +test('Returns own methods', () => { + expect(functions(new Foo())).toEqual( ['a', 'b']); +}); +test('Returns own and inherited methods', () => { + expect(functions(new Foo(), true)).toEqual(['a', 'b', 'c']); }); diff --git a/test/gcd/gcd.test.js b/test/gcd/gcd.test.js index a222fe04b..8657042d6 100644 --- a/test/gcd/gcd.test.js +++ b/test/gcd/gcd.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const gcd = require('./gcd.js'); -test('Testing gcd', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof gcd === 'function', 'gcd is a Function'); - t.equal(gcd(8, 36), 4, "Calculates the greatest common divisor between two or more numbers/arrays"); - t.deepEqual(gcd(...[12, 8, 32]), 4, "Calculates the greatest common divisor between two or more numbers/arrays"); - //t.deepEqual(gcd(args..), 'Expected'); - //t.equal(gcd(args..), 'Expected'); - //t.false(gcd(args..), 'Expected'); - //t.throws(gcd(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('gcd is a Function', () => { + expect(gcd).toBeInstanceOf(Function); +}); +test('Calculates the greatest common divisor between two or more numbers/arrays', () => { + expect(gcd(8, 36)).toBe(4); +}); +test('Calculates the greatest common divisor between two or more numbers/arrays', () => { + expect(gcd(...[12, 8, 32])).toEqual(4); +}); diff --git a/test/geometricProgression/geometricProgression.test.js b/test/geometricProgression/geometricProgression.test.js index 059e83682..6ac3ed8e4 100644 --- a/test/geometricProgression/geometricProgression.test.js +++ b/test/geometricProgression/geometricProgression.test.js @@ -1,16 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const geometricProgression = require('./geometricProgression.js'); -test('Testing geometricProgression', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof geometricProgression === 'function', 'geometricProgression is a Function'); - t.deepEqual(geometricProgression(256), [1, 2, 4, 8, 16, 32, 64, 128, 256], "Initializes an array containing the numbers in the specified range"); - t.deepEqual(geometricProgression(256, 3), [3, 6, 12, 24, 48, 96, 192], "Initializes an array containing the numbers in the specified range"); - t.deepEqual(geometricProgression(256, 1, 4), [1, 4, 16, 64, 256], "Initializes an array containing the numbers in the specified range"); - //t.deepEqual(geometricProgression(args..), 'Expected'); - //t.equal(geometricProgression(args..), 'Expected'); - //t.false(geometricProgression(args..), 'Expected'); - //t.throws(geometricProgression(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('geometricProgression is a Function', () => { + expect(geometricProgression).toBeInstanceOf(Function); +}); +test('Initializes an array containing the numbers in the specified range', () => { + expect(geometricProgression(256)).toEqual([1, 2, 4, 8, 16, 32, 64, 128, 256]); +}); +test('Initializes an array containing the numbers in the specified range', () => { + expect(geometricProgression(256, 3)).toEqual([3, 6, 12, 24, 48, 96, 192]); +}); +test('Initializes an array containing the numbers in the specified range', () => { + expect(geometricProgression(256, 1, 4)).toEqual([1, 4, 16, 64, 256]); +}); diff --git a/test/get/get.test.js b/test/get/get.test.js index d8448a171..715ee0033 100644 --- a/test/get/get.test.js +++ b/test/get/get.test.js @@ -1,15 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const get = require('./get.js'); -test('Testing get', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof get === 'function', 'get is a Function'); - const obj = { selector: { to: { val: 'val to get' } } }; - t.deepEqual(get(obj, 'selector.to.val'), ['val to get'], "Retrieve a property indicated by the selector from an object."); - //t.deepEqual(get(args..), 'Expected'); - //t.equal(get(args..), 'Expected'); - //t.false(get(args..), 'Expected'); - //t.throws(get(args..), 'Expected'); - t.end(); +test('get is a Function', () => { + expect(get).toBeInstanceOf(Function); +}); +const obj = { selector: { to: { val: 'val to get' } } }; +test('Retrieve a property indicated by the selector from an object.', () => { + expect(get(obj, 'selector.to.val')).toEqual(['val to get']); }); diff --git a/test/getColonTimeFromDate/getColonTimeFromDate.test.js b/test/getColonTimeFromDate/getColonTimeFromDate.test.js index d1f0f3789..e834ac265 100644 --- a/test/getColonTimeFromDate/getColonTimeFromDate.test.js +++ b/test/getColonTimeFromDate/getColonTimeFromDate.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const getColonTimeFromDate = require('./getColonTimeFromDate.js'); -test('Testing getColonTimeFromDate', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof getColonTimeFromDate === 'function', 'getColonTimeFromDate is a Function'); - //t.deepEqual(getColonTimeFromDate(args..), 'Expected'); - //t.equal(getColonTimeFromDate(args..), 'Expected'); - //t.false(getColonTimeFromDate(args..), 'Expected'); - //t.throws(getColonTimeFromDate(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('getColonTimeFromDate is a Function', () => { + expect(getColonTimeFromDate).toBeInstanceOf(Function); +}); diff --git a/test/getDaysDiffBetweenDates/getDaysDiffBetweenDates.test.js b/test/getDaysDiffBetweenDates/getDaysDiffBetweenDates.test.js index 56bf82f8c..2128fe077 100644 --- a/test/getDaysDiffBetweenDates/getDaysDiffBetweenDates.test.js +++ b/test/getDaysDiffBetweenDates/getDaysDiffBetweenDates.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const getDaysDiffBetweenDates = require('./getDaysDiffBetweenDates.js'); -test('Testing getDaysDiffBetweenDates', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof getDaysDiffBetweenDates === 'function', 'getDaysDiffBetweenDates is a Function'); - t.equal(getDaysDiffBetweenDates(new Date('2017-12-13'), new Date('2017-12-22')), 9, "Returns the difference in days between two dates"); - //t.deepEqual(getDaysDiffBetweenDates(args..), 'Expected'); - //t.equal(getDaysDiffBetweenDates(args..), 'Expected'); - //t.false(getDaysDiffBetweenDates(args..), 'Expected'); - //t.throws(getDaysDiffBetweenDates(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('getDaysDiffBetweenDates is a Function', () => { + expect(getDaysDiffBetweenDates).toBeInstanceOf(Function); +}); +test('Returns the difference in days between two dates', () => { + expect(getDaysDiffBetweenDates(new Date('2017-12-13'), new Date('2017-12-22'))).toBe(9); +}); diff --git a/test/getMeridiemSuffixOfInteger/getMeridiemSuffixOfInteger.test.js b/test/getMeridiemSuffixOfInteger/getMeridiemSuffixOfInteger.test.js index 7df3d24df..936eb3c13 100644 --- a/test/getMeridiemSuffixOfInteger/getMeridiemSuffixOfInteger.test.js +++ b/test/getMeridiemSuffixOfInteger/getMeridiemSuffixOfInteger.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const getMeridiemSuffixOfInteger = require('./getMeridiemSuffixOfInteger.js'); -test('Testing getMeridiemSuffixOfInteger', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof getMeridiemSuffixOfInteger === 'function', 'getMeridiemSuffixOfInteger is a Function'); - //t.deepEqual(getMeridiemSuffixOfInteger(args..), 'Expected'); - //t.equal(getMeridiemSuffixOfInteger(args..), 'Expected'); - //t.false(getMeridiemSuffixOfInteger(args..), 'Expected'); - //t.throws(getMeridiemSuffixOfInteger(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('getMeridiemSuffixOfInteger is a Function', () => { + expect(getMeridiemSuffixOfInteger).toBeInstanceOf(Function); +}); diff --git a/test/getScrollPosition/getScrollPosition.test.js b/test/getScrollPosition/getScrollPosition.test.js index 9f7fd14d7..0137c4eb4 100644 --- a/test/getScrollPosition/getScrollPosition.test.js +++ b/test/getScrollPosition/getScrollPosition.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const getScrollPosition = require('./getScrollPosition.js'); -test('Testing getScrollPosition', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof getScrollPosition === 'function', 'getScrollPosition is a Function'); - t.pass('Tested by @chalarangelo on 16/02/2018'); - //t.deepEqual(getScrollPosition(args..), 'Expected'); - //t.equal(getScrollPosition(args..), 'Expected'); - //t.false(getScrollPosition(args..), 'Expected'); - //t.throws(getScrollPosition(args..), 'Expected'); - t.end(); +test('getScrollPosition is a Function', () => { + expect(getScrollPosition).toBeInstanceOf(Function); }); diff --git a/test/getStyle/getStyle.test.js b/test/getStyle/getStyle.test.js index 23bac0147..6f279ab81 100644 --- a/test/getStyle/getStyle.test.js +++ b/test/getStyle/getStyle.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const getStyle = require('./getStyle.js'); -test('Testing getStyle', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof getStyle === 'function', 'getStyle is a Function'); - t.pass('Tested by @chalarangelo on 16/02/2018'); - //t.deepEqual(getStyle(args..), 'Expected'); - //t.equal(getStyle(args..), 'Expected'); - //t.false(getStyle(args..), 'Expected'); - //t.throws(getStyle(args..), 'Expected'); - t.end(); +test('getStyle is a Function', () => { + expect(getStyle).toBeInstanceOf(Function); }); diff --git a/test/getType/getType.test.js b/test/getType/getType.test.js index 359e9ea07..660a7f020 100644 --- a/test/getType/getType.test.js +++ b/test/getType/getType.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const getType = require('./getType.js'); -test('Testing getType', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof getType === 'function', 'getType is a Function'); - t.equal(getType(new Set([1, 2, 3])), 'set', "Returns the native type of a value"); - //t.deepEqual(getType(args..), 'Expected'); - //t.equal(getType(args..), 'Expected'); - //t.false(getType(args..), 'Expected'); - //t.throws(getType(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('getType is a Function', () => { + expect(getType).toBeInstanceOf(Function); +}); +test('Returns the native type of a value', () => { + expect(getType(new Set([1, 2, 3]))).toBe('set'); +}); diff --git a/test/getURLParameters/getURLParameters.test.js b/test/getURLParameters/getURLParameters.test.js index a030f86ee..f23854b52 100644 --- a/test/getURLParameters/getURLParameters.test.js +++ b/test/getURLParameters/getURLParameters.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const getURLParameters = require('./getURLParameters.js'); -test('Testing getURLParameters', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof getURLParameters === 'function', 'getURLParameters is a Function'); - t.deepEqual(getURLParameters('http://url.com/page?name=Adam&surname=Smith'), {name: 'Adam', surname: 'Smith'}, "Returns an object containing the parameters of the current URL"); - //t.deepEqual(getURLParameters(args..), 'Expected'); - //t.equal(getURLParameters(args..), 'Expected'); - //t.false(getURLParameters(args..), 'Expected'); - //t.throws(getURLParameters(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('getURLParameters is a Function', () => { + expect(getURLParameters).toBeInstanceOf(Function); +}); +test('Returns an object containing the parameters of the current URL', () => { + expect(getURLParameters('http://url.com/page?name=Adam&surname=Smith')).toEqual({name: 'Adam', surname: 'Smith'}); +}); diff --git a/test/groupBy/groupBy.test.js b/test/groupBy/groupBy.test.js index e3e8528bb..7f1c61eae 100644 --- a/test/groupBy/groupBy.test.js +++ b/test/groupBy/groupBy.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const groupBy = require('./groupBy.js'); -test('Testing groupBy', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof groupBy === 'function', 'groupBy is a Function'); - t.deepEqual(groupBy([6.1, 4.2, 6.3], Math.floor), {4: [4.2], 6: [6.1, 6.3]}, "Groups the elements of an array based on the given function"); - t.deepEqual(groupBy(['one', 'two', 'three'], 'length'), {3: ['one', 'two'], 5: ['three']}, "Groups the elements of an array based on the given function"); - //t.deepEqual(groupBy(args..), 'Expected'); - //t.equal(groupBy(args..), 'Expected'); - //t.false(groupBy(args..), 'Expected'); - //t.throws(groupBy(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('groupBy is a Function', () => { + expect(groupBy).toBeInstanceOf(Function); +}); +test('Groups the elements of an array based on the given function', () => { + expect(groupBy([6.1, 4.2, 6.3], Math.floor)).toEqual({4: [4.2], 6: [6.1, 6.3]}); +}); +test('Groups the elements of an array based on the given function', () => { + expect(groupBy(['one', 'two', 'three'], 'length')).toEqual({3: ['one', 'two'], 5: ['three']}); +}); diff --git a/test/hammingDistance/hammingDistance.test.js b/test/hammingDistance/hammingDistance.test.js index 6ada1733c..b884b6c89 100644 --- a/test/hammingDistance/hammingDistance.test.js +++ b/test/hammingDistance/hammingDistance.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const hammingDistance = require('./hammingDistance.js'); -test('Testing hammingDistance', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof hammingDistance === 'function', 'hammingDistance is a Function'); - t.equal(hammingDistance(2, 3), 1, "retuns hamming disance between 2 values"); - //t.deepEqual(hammingDistance(args..), 'Expected'); - //t.equal(hammingDistance(args..), 'Expected'); - //t.false(hammingDistance(args..), 'Expected'); - //t.throws(hammingDistance(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('hammingDistance is a Function', () => { + expect(hammingDistance).toBeInstanceOf(Function); +}); +test('retuns hamming disance between 2 values', () => { + expect(hammingDistance(2, 3)).toBe(1); +}); diff --git a/test/hasClass/hasClass.test.js b/test/hasClass/hasClass.test.js index 43932ea01..74198e04e 100644 --- a/test/hasClass/hasClass.test.js +++ b/test/hasClass/hasClass.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const hasClass = require('./hasClass.js'); -test('Testing hasClass', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof hasClass === 'function', 'hasClass is a Function'); - //t.deepEqual(hasClass(args..), 'Expected'); - //t.equal(hasClass(args..), 'Expected'); - //t.false(hasClass(args..), 'Expected'); - //t.throws(hasClass(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('hasClass is a Function', () => { + expect(hasClass).toBeInstanceOf(Function); +}); diff --git a/test/hasFlags/hasFlags.test.js b/test/hasFlags/hasFlags.test.js index be0d4c301..b709e53f5 100644 --- a/test/hasFlags/hasFlags.test.js +++ b/test/hasFlags/hasFlags.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const hasFlags = require('./hasFlags.js'); -test('Testing hasFlags', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof hasFlags === 'function', 'hasFlags is a Function'); - t.pass('Tested by @chalarangelo on 16/02/2018'); - //t.deepEqual(hasFlags(args..), 'Expected'); - //t.equal(hasFlags(args..), 'Expected'); - //t.false(hasFlags(args..), 'Expected'); - //t.throws(hasFlags(args..), 'Expected'); - t.end(); +test('hasFlags is a Function', () => { + expect(hasFlags).toBeInstanceOf(Function); }); diff --git a/test/hashBrowser/hashBrowser.test.js b/test/hashBrowser/hashBrowser.test.js index 5464dd95d..e51fe281c 100644 --- a/test/hashBrowser/hashBrowser.test.js +++ b/test/hashBrowser/hashBrowser.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const hashBrowser = require('./hashBrowser.js'); -test('Testing hashBrowser', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof hashBrowser === 'function', 'hashBrowser is a Function'); - t.pass('Tested by @chalarangelo on 16/02/2018'); - //t.deepEqual(hashBrowser(args..), 'Expected'); - //t.equal(hashBrowser(args..), 'Expected'); - //t.false(hashBrowser(args..), 'Expected'); - //t.throws(hashBrowser(args..), 'Expected'); - t.end(); +test('hashBrowser is a Function', () => { + expect(hashBrowser).toBeInstanceOf(Function); }); diff --git a/test/hashNode/hashNode.test.js b/test/hashNode/hashNode.test.js index 51345a607..250701418 100644 --- a/test/hashNode/hashNode.test.js +++ b/test/hashNode/hashNode.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const hashNode = require('./hashNode.js'); -test('Testing hashNode', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof hashNode === 'function', 'hashNode is a Function'); - hashNode(JSON.stringify({ a: 'a', b: [1, 2, 3, 4], foo: { c: 'bar' } })).then(v => t.equal(v, '04aa106279f5977f59f9067fa9712afc4aedc6f5862a8defc34552d8c7206393', 'Produces the appropriate hash')); - //t.deepEqual(hashNode(args..), 'Expected'); - //t.equal(hashNode(args..), 'Expected'); - //t.false(hashNode(args..), 'Expected'); - //t.throws(hashNode(args..), 'Expected'); - t.end(); +test('hashNode is a Function', () => { + expect(hashNode).toBeInstanceOf(Function); +}); +test('Produces the appropriate hash', () => { + hashNode(JSON.stringify({ a: 'a', b: [1, 2, 3, 4], foo: { c: 'bar' } })).then(v => expect(v).toBe('04aa106279f5977f59f9067fa9712afc4aedc6f5862a8defc34552d8c7206393')); }); diff --git a/test/head/head.test.js b/test/head/head.test.js index b6fa2d188..ec707eb30 100644 --- a/test/head/head.test.js +++ b/test/head/head.test.js @@ -1,21 +1,33 @@ -const test = require('tape'); +const expect = require('expect'); const head = require('./head.js'); -test('Testing head', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof head === 'function', 'head is a Function'); - t.true(head({ a: 1234}) === undefined, 'head({ a: 1234}) returns undefined'); - t.equal(head([1, 2, 3]), 1, "head([1, 2, 3]) returns 1"); - t.equal(head({ 0: false}), false, 'head({ 0: false}) returns false'); - t.equal(head('String'), 'S', 'head(String) returns S'); - t.throws(() => head(null), 'head(null) throws an Error'); - t.throws(() => head(undefined), 'head(undefined) throws an Error'); - t.throws(() => head(), 'head() throws an Error'); - - let start = new Date().getTime(); - head([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]); - let end = new Date().getTime(); - t.true((end - start) < 2000, 'head([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run'); - t.end(); -}); \ No newline at end of file +test('head is a Function', () => { + expect(head).toBeInstanceOf(Function); +}); +test('head({ a: 1234}) returns undefined', () => { + expect(head({ a: 1234}) === undefined).toBeTruthy(); +}); +test('head([1, 2, 3]) returns 1', () => { + expect(head([1, 2, 3])).toBe(1); +}); +test('head({ 0: false}) returns false', () => { + expect(head({ 0: false})).toBeFalsy(); +}); +test('head(String) returns S', () => { + expect(head('String')).toBe('S'); +}); +test('head(null) throws an Error', () => { + expect(() => { head(null); }).toThrow(); +}); +test('head(undefined) throws an Error', () => { + expect(() => { head(undefined); }).toThrow(); +}); +test('head() throws an Error', () => { + expect(() => { head(); }).toThrow(); +}); +let start = new Date().getTime(); +head([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]); +let end = new Date().getTime(); +test('head([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run', () => { + expect((end - start) < 2000).toBeTruthy(); +}); diff --git a/test/hexToRGB/hexToRGB.test.js b/test/hexToRGB/hexToRGB.test.js index 4b3d0fdd8..2f2bf427e 100644 --- a/test/hexToRGB/hexToRGB.test.js +++ b/test/hexToRGB/hexToRGB.test.js @@ -1,16 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const hexToRGB = require('./hexToRGB.js'); -test('Testing hexToRGB', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof hexToRGB === 'function', 'hexToRGB is a Function'); - t.equal(hexToRGB('#27ae60ff'), 'rgba(39, 174, 96, 255)', "Converts a color code to a rgb() or rgba() string"); - t.equal(hexToRGB('27ae60'), 'rgb(39, 174, 96)', "Converts a color code to a rgb() or rgba() string"); - t.equal(hexToRGB('#fff'), 'rgb(255, 255, 255)', "Converts a color code to a rgb() or rgba() string"); - //t.deepEqual(hexToRGB(args..), 'Expected'); - //t.equal(hexToRGB(args..), 'Expected'); - //t.false(hexToRGB(args..), 'Expected'); - //t.throws(hexToRGB(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('hexToRGB is a Function', () => { + expect(hexToRGB).toBeInstanceOf(Function); +}); +test('Converts a color code to a rgb() or rgba() string', () => { + expect(hexToRGB('#27ae60ff')).toBe('rgba(39, 174, 96, 255)'); +}); +test('Converts a color code to a rgb() or rgba() string', () => { + expect(hexToRGB('27ae60')).toBe('rgb(39, 174, 96)'); +}); +test('Converts a color code to a rgb() or rgba() string', () => { + expect(hexToRGB('#fff')).toBe('rgb(255, 255, 255)'); +}); diff --git a/test/hide/hide.test.js b/test/hide/hide.test.js index af1971858..7cfa1ec53 100644 --- a/test/hide/hide.test.js +++ b/test/hide/hide.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const hide = require('./hide.js'); -test('Testing hide', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof hide === 'function', 'hide is a Function'); - t.pass('Tested by @chalarangelo on 16/02/2018'); - //t.deepEqual(hide(args..), 'Expected'); - //t.equal(hide(args..), 'Expected'); - //t.false(hide(args..), 'Expected'); - //t.throws(hide(args..), 'Expected'); - t.end(); +test('hide is a Function', () => { + expect(hide).toBeInstanceOf(Function); }); diff --git a/test/howManyTimes/howManyTimes.test.js b/test/howManyTimes/howManyTimes.test.js index 250b542ce..e0d7efe30 100644 --- a/test/howManyTimes/howManyTimes.test.js +++ b/test/howManyTimes/howManyTimes.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const howManyTimes = require('./howManyTimes.js'); -test('Testing howManyTimes', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof howManyTimes === 'function', 'howManyTimes is a Function'); - //t.deepEqual(howManyTimes(args..), 'Expected'); - //t.equal(howManyTimes(args..), 'Expected'); - //t.false(howManyTimes(args..), 'Expected'); - //t.throws(howManyTimes(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('howManyTimes is a Function', () => { + expect(howManyTimes).toBeInstanceOf(Function); +}); diff --git a/test/httpDelete/httpDelete.test.js b/test/httpDelete/httpDelete.test.js index d4edd42a9..6603d33bd 100644 --- a/test/httpDelete/httpDelete.test.js +++ b/test/httpDelete/httpDelete.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const httpDelete = require('./httpDelete.js'); -test('Testing httpDelete', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof httpDelete === 'function', 'httpDelete is a Function'); - //t.deepEqual(httpDelete(args..), 'Expected'); - //t.equal(httpDelete(args..), 'Expected'); - //t.false(httpDelete(args..), 'Expected'); - //t.throws(httpDelete(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('httpDelete is a Function', () => { + expect(httpDelete).toBeInstanceOf(Function); +}); diff --git a/test/httpGet/httpGet.test.js b/test/httpGet/httpGet.test.js index a23ff2131..5a19d5adc 100644 --- a/test/httpGet/httpGet.test.js +++ b/test/httpGet/httpGet.test.js @@ -1,640 +1,6 @@ -const test = require('tape'); -//const httpGet = require('./httpGet.js'); -// Override -const httpGet = (url, callback, err = console.error) => { - const request = new XMLHttpRequest(); - request.open('GET', url, true); - request.onload = () => callback(request.responseText); - request.onerror = () => err(request); - request.send(); -}; +const expect = require('expect'); +const httpGet = require('./httpGet.js'); -test('Testing httpGet', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof httpGet === 'function', 'httpGet is a Function'); - httpGet('https://jsonplaceholder.typicode.com/posts/1', response => { - t.deepEqual(JSON.parse(response), { - userId: 1, - id: 1, - title: - 'sunt aut facere repellat provident occaecati excepturi optio reprehenderit', - body: - 'quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto', - }, 'Sends a GET request'); - }); - - //t.deepEqual(httpGet(args..), 'Expected'); - //t.equal(httpGet(args..), 'Expected'); - //t.false(httpGet(args..), 'Expected'); - //t.throws(httpGet(args..), 'Expected'); - t.end(); +test('httpGet is a Function', () => { + expect(httpGet).toBeInstanceOf(Function); }); -// Custom implementation of XMLHttpRequest for the requirements of this snippet. -// Based on https://github.com/driverdan/node-XMLHttpRequest -var Url = require("url"); -var spawn = require("child_process").spawn; -var fs = require("fs"); -XMLHttpRequest = function() { - "use strict"; - - /** - * Private variables - */ - var self = this; - var http = require("http"); - var https = require("https"); - - // Holds http.js objects - var request; - var response; - - // Request settings - var settings = {}; - - // Disable header blacklist. - // Not part of XHR specs. - var disableHeaderCheck = false; - - // Set some default headers - var defaultHeaders = { - "User-Agent": "node-XMLHttpRequest", - "Accept": "*/*", - }; - - var headers = {}; - var headersCase = {}; - - // These headers are not user setable. - // The following are allowed but banned in the spec: - // * user-agent - var forbiddenRequestHeaders = [ - "accept-charset", - "accept-encoding", - "access-control-request-headers", - "access-control-request-method", - "connection", - "content-length", - "content-transfer-encoding", - "cookie", - "cookie2", - "date", - "expect", - "host", - "keep-alive", - "origin", - "referer", - "te", - "trailer", - "transfer-encoding", - "upgrade", - "via" - ]; - - // These request methods are not allowed - var forbiddenRequestMethods = [ - "TRACE", - "TRACK", - "CONNECT" - ]; - - // Send flag - var sendFlag = false; - // Error flag, used when errors occur or abort is called - var errorFlag = false; - - // Event listeners - var listeners = {}; - - /** - * Constants - */ - - this.UNSENT = 0; - this.OPENED = 1; - this.HEADERS_RECEIVED = 2; - this.LOADING = 3; - this.DONE = 4; - - /** - * Public vars - */ - - // Current state - this.readyState = this.UNSENT; - - // default ready state change handler in case one is not set or is set late - this.onreadystatechange = null; - - // Result & response - this.responseText = ""; - this.responseXML = ""; - this.status = null; - this.statusText = null; - - // Whether cross-site Access-Control requests should be made using - // credentials such as cookies or authorization headers - this.withCredentials = false; - - /** - * Private methods - */ - - /** - * Check if the specified header is allowed. - * - * @param string header Header to validate - * @return boolean False if not allowed, otherwise true - */ - var isAllowedHttpHeader = function(header) { - return disableHeaderCheck || (header && forbiddenRequestHeaders.indexOf(header.toLowerCase()) === -1); - }; - - /** - * Check if the specified method is allowed. - * - * @param string method Request method to validate - * @return boolean False if not allowed, otherwise true - */ - var isAllowedHttpMethod = function(method) { - return (method && forbiddenRequestMethods.indexOf(method) === -1); - }; - - /** - * Public methods - */ - - /** - * Open the connection. Currently supports local server requests. - * - * @param string method Connection method (eg GET, POST) - * @param string url URL for the connection. - * @param boolean async Asynchronous connection. Default is true. - * @param string user Username for basic authentication (optional) - * @param string password Password for basic authentication (optional) - */ - this.open = function(method, url, async, user, password) { - this.abort(); - errorFlag = false; - - // Check for valid request method - if (!isAllowedHttpMethod(method)) { - throw new Error("SecurityError: Request method not allowed"); - } - - settings = { - "method": method, - "url": url.toString(), - "async": (typeof async !== "boolean" ? true : async), - "user": user || null, - "password": password || null - }; - - setState(this.OPENED); - }; - - /** - * Disables or enables isAllowedHttpHeader() check the request. Enabled by default. - * This does not conform to the W3C spec. - * - * @param boolean state Enable or disable header checking. - */ - this.setDisableHeaderCheck = function(state) { - disableHeaderCheck = state; - }; - - /** - * Sets a header for the request or appends the value if one is already set. - * - * @param string header Header name - * @param string value Header value - */ - this.setRequestHeader = function(header, value) { - if (this.readyState !== this.OPENED) { - throw new Error("INVALID_STATE_ERR: setRequestHeader can only be called when state is OPEN"); - } - if (!isAllowedHttpHeader(header)) { - console.warn("Refused to set unsafe header \"" + header + "\""); - return; - } - if (sendFlag) { - throw new Error("INVALID_STATE_ERR: send flag is true"); - } - header = headersCase[header.toLowerCase()] || header; - headersCase[header.toLowerCase()] = header; - headers[header] = headers[header] ? headers[header] + ', ' + value : value; - }; - - /** - * Gets a header from the server response. - * - * @param string header Name of header to get. - * @return string Text of the header or null if it doesn't exist. - */ - this.getResponseHeader = function(header) { - if (typeof header === "string" - && this.readyState > this.OPENED - && response - && response.headers - && response.headers[header.toLowerCase()] - && !errorFlag - ) { - return response.headers[header.toLowerCase()]; - } - - return null; - }; - - /** - * Gets all the response headers. - * - * @return string A string with all response headers separated by CR+LF - */ - this.getAllResponseHeaders = function() { - if (this.readyState < this.HEADERS_RECEIVED || errorFlag) { - return ""; - } - var result = ""; - - for (var i in response.headers) { - // Cookie headers are excluded - if (i !== "set-cookie" && i !== "set-cookie2") { - result += i + ": " + response.headers[i] + "\r\n"; - } - } - return result.substr(0, result.length - 2); - }; - - /** - * Gets a request header - * - * @param string name Name of header to get - * @return string Returns the request header or empty string if not set - */ - this.getRequestHeader = function(name) { - if (typeof name === "string" && headersCase[name.toLowerCase()]) { - return headers[headersCase[name.toLowerCase()]]; - } - - return ""; - }; - - /** - * Sends the request to the server. - * - * @param string data Optional data to send as request body. - */ - this.send = function(data) { - if (this.readyState !== this.OPENED) { - throw new Error("INVALID_STATE_ERR: connection must be opened before send() is called"); - } - - if (sendFlag) { - throw new Error("INVALID_STATE_ERR: send has already been called"); - } - - var ssl = false, local = false; - var url = Url.parse(settings.url); - var host; - // Determine the server - switch (url.protocol) { - case "https:": - ssl = true; - // SSL & non-SSL both need host, no break here. - case "http:": - host = url.hostname; - break; - - case "file:": - local = true; - break; - - case undefined: - case null: - case "": - host = "localhost"; - break; - - default: - throw new Error("Protocol not supported."); - } - - // Load files off the local filesystem (file://) - if (local) { - if (settings.method !== "GET") { - throw new Error("XMLHttpRequest: Only GET method is supported"); - } - - if (settings.async) { - fs.readFile(url.pathname, "utf8", function(error, data) { - if (error) { - self.handleError(error); - } else { - self.status = 200; - self.responseText = data; - setState(self.DONE); - } - }); - } else { - try { - this.responseText = fs.readFileSync(url.pathname, "utf8"); - this.status = 200; - setState(self.DONE); - } catch(e) { - this.handleError(e); - } - } - - return; - } - - // Default to port 80. If accessing localhost on another port be sure - // to use http://localhost:port/path - var port = url.port || (ssl ? 443 : 80); - // Add query string if one is used - var uri = url.pathname + (url.search ? url.search : ""); - - // Set the defaults if they haven't been set - for (var name in defaultHeaders) { - if (!headersCase[name.toLowerCase()]) { - headers[name] = defaultHeaders[name]; - } - } - - // Set the Host header or the server may reject the request - headers.Host = host; - if (!((ssl && port === 443) || port === 80)) { - headers.Host += ":" + url.port; - } - - // Set Basic Auth if necessary - if (settings.user) { - if (typeof settings.password === "undefined") { - settings.password = ""; - } - var authBuf = new Buffer(settings.user + ":" + settings.password); - headers.Authorization = "Basic " + authBuf.toString("base64"); - } - - // Set content length header - if (settings.method === "GET" || settings.method === "HEAD") { - data = null; - } else if (data) { - headers["Content-Length"] = Buffer.isBuffer(data) ? data.length : Buffer.byteLength(data); - - if (!headers["Content-Type"]) { - headers["Content-Type"] = "text/plain;charset=UTF-8"; - } - } else if (settings.method === "POST") { - // For a post with no data set Content-Length: 0. - // This is required by buggy servers that don't meet the specs. - headers["Content-Length"] = 0; - } - - var options = { - host: host, - port: port, - path: uri, - method: settings.method, - headers: headers, - agent: false, - withCredentials: self.withCredentials - }; - - // Reset error flag - errorFlag = false; - - // Handle async requests - if (settings.async) { - // Use the proper protocol - var doRequest = ssl ? https.request : http.request; - - // Request is being sent, set send flag - sendFlag = true; - - // As per spec, this is called here for historical reasons. - self.dispatchEvent("readystatechange"); - - // Handler for the response - var responseHandler = function responseHandler(resp) { - // Set response var to the response we got back - // This is so it remains accessable outside this scope - response = resp; - // Check for redirect - // @TODO Prevent looped redirects - if (response.statusCode === 301 || response.statusCode === 302 || response.statusCode === 303 || response.statusCode === 307) { - // Change URL to the redirect location - settings.url = response.headers.location; - var url = Url.parse(settings.url); - // Set host var in case it's used later - host = url.hostname; - // Options for the new request - var newOptions = { - hostname: url.hostname, - port: url.port, - path: url.path, - method: response.statusCode === 303 ? "GET" : settings.method, - headers: headers, - withCredentials: self.withCredentials - }; - - // Issue the new request - request = doRequest(newOptions, responseHandler).on("error", errorHandler); - request.end(); - // @TODO Check if an XHR event needs to be fired here - return; - } - - response.setEncoding("utf8"); - - setState(self.HEADERS_RECEIVED); - self.status = response.statusCode; - - response.on("data", function(chunk) { - // Make sure there's some data - if (chunk) { - self.responseText += chunk; - } - // Don't emit state changes if the connection has been aborted. - if (sendFlag) { - setState(self.LOADING); - } - }); - - response.on("end", function() { - if (sendFlag) { - // Discard the end event if the connection has been aborted - setState(self.DONE); - sendFlag = false; - } - }); - - response.on("error", function(error) { - self.handleError(error); - }); - }; - - // Error handler for the request - var errorHandler = function errorHandler(error) { - self.handleError(error); - }; - - // Create the request - request = doRequest(options, responseHandler).on("error", errorHandler); - - // Node 0.4 and later won't accept empty data. Make sure it's needed. - if (data) { - request.write(data); - } - - request.end(); - - self.dispatchEvent("loadstart"); - } else { // Synchronous - // Create a temporary file for communication with the other Node process - var contentFile = ".node-xmlhttprequest-content-" + process.pid; - var syncFile = ".node-xmlhttprequest-sync-" + process.pid; - fs.writeFileSync(syncFile, "", "utf8"); - // The async request the other Node process executes - var execString = "var http = require('http'), https = require('https'), fs = require('fs');" - + "var doRequest = http" + (ssl ? "s" : "") + ".request;" - + "var options = " + JSON.stringify(options) + ";" - + "var responseText = '';" - + "var req = doRequest(options, function(response) {" - + "response.setEncoding('utf8');" - + "response.on('data', function(chunk) {" - + " responseText += chunk;" - + "});" - + "response.on('end', function() {" - + "fs.writeFileSync('" + contentFile + "', JSON.stringify({err: null, data: {statusCode: response.statusCode, headers: response.headers, text: responseText}}), 'utf8');" - + "fs.unlinkSync('" + syncFile + "');" - + "});" - + "response.on('error', function(error) {" - + "fs.writeFileSync('" + contentFile + "', JSON.stringify({err: error}), 'utf8');" - + "fs.unlinkSync('" + syncFile + "');" - + "});" - + "}).on('error', function(error) {" - + "fs.writeFileSync('" + contentFile + "', JSON.stringify({err: error}), 'utf8');" - + "fs.unlinkSync('" + syncFile + "');" - + "});" - + (data ? "req.write('" + JSON.stringify(data).slice(1,-1).replace(/'/g, "\\'") + "');":"") - + "req.end();"; - // Start the other Node Process, executing this string - var syncProc = spawn(process.argv[0], ["-e", execString]); - while(fs.existsSync(syncFile)) { - // Wait while the sync file is empty - } - var resp = JSON.parse(fs.readFileSync(contentFile, 'utf8')); - // Kill the child process once the file has data - syncProc.stdin.end(); - // Remove the temporary file - fs.unlinkSync(contentFile); - - if (resp.err) { - self.handleError(resp.err); - } else { - response = resp.data; - self.status = resp.data.statusCode; - self.responseText = resp.data.text; - setState(self.DONE); - } - } - }; - - /** - * Called when an error is encountered to deal with it. - */ - this.handleError = function(error) { - this.status = 0; - this.statusText = error; - this.responseText = error.stack; - errorFlag = true; - setState(this.DONE); - this.dispatchEvent('error'); - }; - - /** - * Aborts a request. - */ - this.abort = function() { - if (request) { - request.abort(); - request = null; - } - - headers = defaultHeaders; - this.status = 0; - this.responseText = ""; - this.responseXML = ""; - - errorFlag = true; - - if (this.readyState !== this.UNSENT - && (this.readyState !== this.OPENED || sendFlag) - && this.readyState !== this.DONE) { - sendFlag = false; - setState(this.DONE); - } - this.readyState = this.UNSENT; - this.dispatchEvent('abort'); - }; - - /** - * Adds an event listener. Preferred method of binding to events. - */ - this.addEventListener = function(event, callback) { - if (!(event in listeners)) { - listeners[event] = []; - } - // Currently allows duplicate callbacks. Should it? - listeners[event].push(callback); - }; - - /** - * Remove an event callback that has already been bound. - * Only works on the matching funciton, cannot be a copy. - */ - this.removeEventListener = function(event, callback) { - if (event in listeners) { - // Filter will return a new array with the callback removed - listeners[event] = listeners[event].filter(function(ev) { - return ev !== callback; - }); - } - }; - - /** - * Dispatch any events, including both "on" methods and events attached using addEventListener. - */ - this.dispatchEvent = function(event) { - if (typeof self["on" + event] === "function") { - self["on" + event](); - } - if (event in listeners) { - for (var i = 0, len = listeners[event].length; i < len; i++) { - listeners[event][i].call(self); - } - } - }; - - /** - * Changes readyState and calls onreadystatechange. - * - * @param int state New state - */ - var setState = function(state) { - if (state == self.LOADING || self.readyState !== state) { - self.readyState = state; - - if (settings.async || self.readyState < self.OPENED || self.readyState === self.DONE) { - self.dispatchEvent("readystatechange"); - } - - if (self.readyState === self.DONE && !errorFlag) { - self.dispatchEvent("load"); - // @TODO figure out InspectorInstrumentation::didLoadXHR(cookie) - self.dispatchEvent("loadend"); - } - } - }; -}; diff --git a/test/httpPost/httpPost.test.js b/test/httpPost/httpPost.test.js index 05fc7f421..13ec36ccd 100644 --- a/test/httpPost/httpPost.test.js +++ b/test/httpPost/httpPost.test.js @@ -1,637 +1,6 @@ -const test = require('tape'); -//const httpPost = require('./httpPost.js'); -const httpPost = (url, data, callback, err = console.error) => { - const request = new XMLHttpRequest(); - request.open('POST', url, true); - request.setRequestHeader('Content-type', 'application/json; charset=utf-8'); - request.onload = () => callback(request.responseText); - request.onerror = () => err(request); - request.send(data); -}; -test('Testing httpPost', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof httpPost === 'function', 'httpPost is a Function'); - const data = { - title: 'foo', - body: 'bar', - userId: 1 - }; - httpPost('https://jsonplaceholder.typicode.com/posts', JSON.stringify(data), response => { - t.deepEqual(JSON.parse(response).id, 101, 'Sends a POST request'); - }); - //t.deepEqual(httpPost(args..), 'Expected'); - //t.equal(httpPost(args..), 'Expected'); - //t.false(httpPost(args..), 'Expected'); - //t.throws(httpPost(args..), 'Expected'); - t.end(); +const expect = require('expect'); +const httpPost = require('./httpPost.js'); + +test('httpPost is a Function', () => { + expect(httpPost).toBeInstanceOf(Function); }); - -// Custom implementation of XMLHttpRequest for the requirements of this snippet. -// Based on https://github.com/driverdan/node-XMLHttpRequest -var Url = require("url"); -var spawn = require("child_process").spawn; -var fs = require("fs"); -XMLHttpRequest = function() { - "use strict"; - - /** - * Private variables - */ - var self = this; - var http = require("http"); - var https = require("https"); - - // Holds http.js objects - var request; - var response; - - // Request settings - var settings = {}; - - // Disable header blacklist. - // Not part of XHR specs. - var disableHeaderCheck = false; - - // Set some default headers - var defaultHeaders = { - "User-Agent": "node-XMLHttpRequest", - "Accept": "*/*", - }; - - var headers = {}; - var headersCase = {}; - - // These headers are not user setable. - // The following are allowed but banned in the spec: - // * user-agent - var forbiddenRequestHeaders = [ - "accept-charset", - "accept-encoding", - "access-control-request-headers", - "access-control-request-method", - "connection", - "content-length", - "content-transfer-encoding", - "cookie", - "cookie2", - "date", - "expect", - "host", - "keep-alive", - "origin", - "referer", - "te", - "trailer", - "transfer-encoding", - "upgrade", - "via" - ]; - - // These request methods are not allowed - var forbiddenRequestMethods = [ - "TRACE", - "TRACK", - "CONNECT" - ]; - - // Send flag - var sendFlag = false; - // Error flag, used when errors occur or abort is called - var errorFlag = false; - - // Event listeners - var listeners = {}; - - /** - * Constants - */ - - this.UNSENT = 0; - this.OPENED = 1; - this.HEADERS_RECEIVED = 2; - this.LOADING = 3; - this.DONE = 4; - - /** - * Public vars - */ - - // Current state - this.readyState = this.UNSENT; - - // default ready state change handler in case one is not set or is set late - this.onreadystatechange = null; - - // Result & response - this.responseText = ""; - this.responseXML = ""; - this.status = null; - this.statusText = null; - - // Whether cross-site Access-Control requests should be made using - // credentials such as cookies or authorization headers - this.withCredentials = false; - - /** - * Private methods - */ - - /** - * Check if the specified header is allowed. - * - * @param string header Header to validate - * @return boolean False if not allowed, otherwise true - */ - var isAllowedHttpHeader = function(header) { - return disableHeaderCheck || (header && forbiddenRequestHeaders.indexOf(header.toLowerCase()) === -1); - }; - - /** - * Check if the specified method is allowed. - * - * @param string method Request method to validate - * @return boolean False if not allowed, otherwise true - */ - var isAllowedHttpMethod = function(method) { - return (method && forbiddenRequestMethods.indexOf(method) === -1); - }; - - /** - * Public methods - */ - - /** - * Open the connection. Currently supports local server requests. - * - * @param string method Connection method (eg GET, POST) - * @param string url URL for the connection. - * @param boolean async Asynchronous connection. Default is true. - * @param string user Username for basic authentication (optional) - * @param string password Password for basic authentication (optional) - */ - this.open = function(method, url, async, user, password) { - this.abort(); - errorFlag = false; - - // Check for valid request method - if (!isAllowedHttpMethod(method)) { - throw new Error("SecurityError: Request method not allowed"); - } - - settings = { - "method": method, - "url": url.toString(), - "async": (typeof async !== "boolean" ? true : async), - "user": user || null, - "password": password || null - }; - - setState(this.OPENED); - }; - - /** - * Disables or enables isAllowedHttpHeader() check the request. Enabled by default. - * This does not conform to the W3C spec. - * - * @param boolean state Enable or disable header checking. - */ - this.setDisableHeaderCheck = function(state) { - disableHeaderCheck = state; - }; - - /** - * Sets a header for the request or appends the value if one is already set. - * - * @param string header Header name - * @param string value Header value - */ - this.setRequestHeader = function(header, value) { - if (this.readyState !== this.OPENED) { - throw new Error("INVALID_STATE_ERR: setRequestHeader can only be called when state is OPEN"); - } - if (!isAllowedHttpHeader(header)) { - console.warn("Refused to set unsafe header \"" + header + "\""); - return; - } - if (sendFlag) { - throw new Error("INVALID_STATE_ERR: send flag is true"); - } - header = headersCase[header.toLowerCase()] || header; - headersCase[header.toLowerCase()] = header; - headers[header] = headers[header] ? headers[header] + ', ' + value : value; - }; - - /** - * Gets a header from the server response. - * - * @param string header Name of header to get. - * @return string Text of the header or null if it doesn't exist. - */ - this.getResponseHeader = function(header) { - if (typeof header === "string" - && this.readyState > this.OPENED - && response - && response.headers - && response.headers[header.toLowerCase()] - && !errorFlag - ) { - return response.headers[header.toLowerCase()]; - } - - return null; - }; - - /** - * Gets all the response headers. - * - * @return string A string with all response headers separated by CR+LF - */ - this.getAllResponseHeaders = function() { - if (this.readyState < this.HEADERS_RECEIVED || errorFlag) { - return ""; - } - var result = ""; - - for (var i in response.headers) { - // Cookie headers are excluded - if (i !== "set-cookie" && i !== "set-cookie2") { - result += i + ": " + response.headers[i] + "\r\n"; - } - } - return result.substr(0, result.length - 2); - }; - - /** - * Gets a request header - * - * @param string name Name of header to get - * @return string Returns the request header or empty string if not set - */ - this.getRequestHeader = function(name) { - if (typeof name === "string" && headersCase[name.toLowerCase()]) { - return headers[headersCase[name.toLowerCase()]]; - } - - return ""; - }; - - /** - * Sends the request to the server. - * - * @param string data Optional data to send as request body. - */ - this.send = function(data) { - if (this.readyState !== this.OPENED) { - throw new Error("INVALID_STATE_ERR: connection must be opened before send() is called"); - } - - if (sendFlag) { - throw new Error("INVALID_STATE_ERR: send has already been called"); - } - - var ssl = false, local = false; - var url = Url.parse(settings.url); - var host; - // Determine the server - switch (url.protocol) { - case "https:": - ssl = true; - // SSL & non-SSL both need host, no break here. - case "http:": - host = url.hostname; - break; - - case "file:": - local = true; - break; - - case undefined: - case null: - case "": - host = "localhost"; - break; - - default: - throw new Error("Protocol not supported."); - } - - // Load files off the local filesystem (file://) - if (local) { - if (settings.method !== "GET") { - throw new Error("XMLHttpRequest: Only GET method is supported"); - } - - if (settings.async) { - fs.readFile(url.pathname, "utf8", function(error, data) { - if (error) { - self.handleError(error); - } else { - self.status = 200; - self.responseText = data; - setState(self.DONE); - } - }); - } else { - try { - this.responseText = fs.readFileSync(url.pathname, "utf8"); - this.status = 200; - setState(self.DONE); - } catch(e) { - this.handleError(e); - } - } - - return; - } - - // Default to port 80. If accessing localhost on another port be sure - // to use http://localhost:port/path - var port = url.port || (ssl ? 443 : 80); - // Add query string if one is used - var uri = url.pathname + (url.search ? url.search : ""); - - // Set the defaults if they haven't been set - for (var name in defaultHeaders) { - if (!headersCase[name.toLowerCase()]) { - headers[name] = defaultHeaders[name]; - } - } - - // Set the Host header or the server may reject the request - headers.Host = host; - if (!((ssl && port === 443) || port === 80)) { - headers.Host += ":" + url.port; - } - - // Set Basic Auth if necessary - if (settings.user) { - if (typeof settings.password === "undefined") { - settings.password = ""; - } - var authBuf = new Buffer(settings.user + ":" + settings.password); - headers.Authorization = "Basic " + authBuf.toString("base64"); - } - - // Set content length header - if (settings.method === "GET" || settings.method === "HEAD") { - data = null; - } else if (data) { - headers["Content-Length"] = Buffer.isBuffer(data) ? data.length : Buffer.byteLength(data); - - if (!headers["Content-Type"]) { - headers["Content-Type"] = "text/plain;charset=UTF-8"; - } - } else if (settings.method === "POST") { - // For a post with no data set Content-Length: 0. - // This is required by buggy servers that don't meet the specs. - headers["Content-Length"] = 0; - } - - var options = { - host: host, - port: port, - path: uri, - method: settings.method, - headers: headers, - agent: false, - withCredentials: self.withCredentials - }; - - // Reset error flag - errorFlag = false; - - // Handle async requests - if (settings.async) { - // Use the proper protocol - var doRequest = ssl ? https.request : http.request; - - // Request is being sent, set send flag - sendFlag = true; - - // As per spec, this is called here for historical reasons. - self.dispatchEvent("readystatechange"); - - // Handler for the response - var responseHandler = function responseHandler(resp) { - // Set response var to the response we got back - // This is so it remains accessable outside this scope - response = resp; - // Check for redirect - // @TODO Prevent looped redirects - if (response.statusCode === 301 || response.statusCode === 302 || response.statusCode === 303 || response.statusCode === 307) { - // Change URL to the redirect location - settings.url = response.headers.location; - var url = Url.parse(settings.url); - // Set host var in case it's used later - host = url.hostname; - // Options for the new request - var newOptions = { - hostname: url.hostname, - port: url.port, - path: url.path, - method: response.statusCode === 303 ? "GET" : settings.method, - headers: headers, - withCredentials: self.withCredentials - }; - - // Issue the new request - request = doRequest(newOptions, responseHandler).on("error", errorHandler); - request.end(); - // @TODO Check if an XHR event needs to be fired here - return; - } - - response.setEncoding("utf8"); - - setState(self.HEADERS_RECEIVED); - self.status = response.statusCode; - - response.on("data", function(chunk) { - // Make sure there's some data - if (chunk) { - self.responseText += chunk; - } - // Don't emit state changes if the connection has been aborted. - if (sendFlag) { - setState(self.LOADING); - } - }); - - response.on("end", function() { - if (sendFlag) { - // Discard the end event if the connection has been aborted - setState(self.DONE); - sendFlag = false; - } - }); - - response.on("error", function(error) { - self.handleError(error); - }); - }; - - // Error handler for the request - var errorHandler = function errorHandler(error) { - self.handleError(error); - }; - - // Create the request - request = doRequest(options, responseHandler).on("error", errorHandler); - - // Node 0.4 and later won't accept empty data. Make sure it's needed. - if (data) { - request.write(data); - } - - request.end(); - - self.dispatchEvent("loadstart"); - } else { // Synchronous - // Create a temporary file for communication with the other Node process - var contentFile = ".node-xmlhttprequest-content-" + process.pid; - var syncFile = ".node-xmlhttprequest-sync-" + process.pid; - fs.writeFileSync(syncFile, "", "utf8"); - // The async request the other Node process executes - var execString = "var http = require('http'), https = require('https'), fs = require('fs');" - + "var doRequest = http" + (ssl ? "s" : "") + ".request;" - + "var options = " + JSON.stringify(options) + ";" - + "var responseText = '';" - + "var req = doRequest(options, function(response) {" - + "response.setEncoding('utf8');" - + "response.on('data', function(chunk) {" - + " responseText += chunk;" - + "});" - + "response.on('end', function() {" - + "fs.writeFileSync('" + contentFile + "', JSON.stringify({err: null, data: {statusCode: response.statusCode, headers: response.headers, text: responseText}}), 'utf8');" - + "fs.unlinkSync('" + syncFile + "');" - + "});" - + "response.on('error', function(error) {" - + "fs.writeFileSync('" + contentFile + "', JSON.stringify({err: error}), 'utf8');" - + "fs.unlinkSync('" + syncFile + "');" - + "});" - + "}).on('error', function(error) {" - + "fs.writeFileSync('" + contentFile + "', JSON.stringify({err: error}), 'utf8');" - + "fs.unlinkSync('" + syncFile + "');" - + "});" - + (data ? "req.write('" + JSON.stringify(data).slice(1,-1).replace(/'/g, "\\'") + "');":"") - + "req.end();"; - // Start the other Node Process, executing this string - var syncProc = spawn(process.argv[0], ["-e", execString]); - while(fs.existsSync(syncFile)) { - // Wait while the sync file is empty - } - var resp = JSON.parse(fs.readFileSync(contentFile, 'utf8')); - // Kill the child process once the file has data - syncProc.stdin.end(); - // Remove the temporary file - fs.unlinkSync(contentFile); - - if (resp.err) { - self.handleError(resp.err); - } else { - response = resp.data; - self.status = resp.data.statusCode; - self.responseText = resp.data.text; - setState(self.DONE); - } - } - }; - - /** - * Called when an error is encountered to deal with it. - */ - this.handleError = function(error) { - this.status = 0; - this.statusText = error; - this.responseText = error.stack; - errorFlag = true; - setState(this.DONE); - this.dispatchEvent('error'); - }; - - /** - * Aborts a request. - */ - this.abort = function() { - if (request) { - request.abort(); - request = null; - } - - headers = defaultHeaders; - this.status = 0; - this.responseText = ""; - this.responseXML = ""; - - errorFlag = true; - - if (this.readyState !== this.UNSENT - && (this.readyState !== this.OPENED || sendFlag) - && this.readyState !== this.DONE) { - sendFlag = false; - setState(this.DONE); - } - this.readyState = this.UNSENT; - this.dispatchEvent('abort'); - }; - - /** - * Adds an event listener. Preferred method of binding to events. - */ - this.addEventListener = function(event, callback) { - if (!(event in listeners)) { - listeners[event] = []; - } - // Currently allows duplicate callbacks. Should it? - listeners[event].push(callback); - }; - - /** - * Remove an event callback that has already been bound. - * Only works on the matching funciton, cannot be a copy. - */ - this.removeEventListener = function(event, callback) { - if (event in listeners) { - // Filter will return a new array with the callback removed - listeners[event] = listeners[event].filter(function(ev) { - return ev !== callback; - }); - } - }; - - /** - * Dispatch any events, including both "on" methods and events attached using addEventListener. - */ - this.dispatchEvent = function(event) { - if (typeof self["on" + event] === "function") { - self["on" + event](); - } - if (event in listeners) { - for (var i = 0, len = listeners[event].length; i < len; i++) { - listeners[event][i].call(self); - } - } - }; - - /** - * Changes readyState and calls onreadystatechange. - * - * @param int state New state - */ - var setState = function(state) { - if (state == self.LOADING || self.readyState !== state) { - self.readyState = state; - - if (settings.async || self.readyState < self.OPENED || self.readyState === self.DONE) { - self.dispatchEvent("readystatechange"); - } - - if (self.readyState === self.DONE && !errorFlag) { - self.dispatchEvent("load"); - // @TODO figure out InspectorInstrumentation::didLoadXHR(cookie) - self.dispatchEvent("loadend"); - } - } - }; -}; diff --git a/test/httpPut/httpPut.test.js b/test/httpPut/httpPut.test.js index d7c3f1e86..d76892baf 100644 --- a/test/httpPut/httpPut.test.js +++ b/test/httpPut/httpPut.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const httpPut = require('./httpPut.js'); -test('Testing httpPut', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof httpPut === 'function', 'httpPut is a Function'); - //t.deepEqual(httpPut(args..), 'Expected'); - //t.equal(httpPut(args..), 'Expected'); - //t.false(httpPut(args..), 'Expected'); - //t.throws(httpPut(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('httpPut is a Function', () => { + expect(httpPut).toBeInstanceOf(Function); +}); diff --git a/test/httpsRedirect/httpsRedirect.test.js b/test/httpsRedirect/httpsRedirect.test.js index f86baf715..68dd20f32 100644 --- a/test/httpsRedirect/httpsRedirect.test.js +++ b/test/httpsRedirect/httpsRedirect.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const httpsRedirect = require('./httpsRedirect.js'); -test('Testing httpsRedirect', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof httpsRedirect === 'function', 'httpsRedirect is a Function'); - t.pass('Tested on 09/02/2018 by @chalarangelo'); - //t.deepEqual(httpsRedirect(args..), 'Expected'); - //t.equal(httpsRedirect(args..), 'Expected'); - //t.false(httpsRedirect(args..), 'Expected'); - //t.throws(httpsRedirect(args..), 'Expected'); - t.end(); +test('httpsRedirect is a Function', () => { + expect(httpsRedirect).toBeInstanceOf(Function); }); diff --git a/test/hz/hz.test.js b/test/hz/hz.test.js index afd054442..58d0b4678 100644 --- a/test/hz/hz.test.js +++ b/test/hz/hz.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const hz = require('./hz.js'); -test('Testing hz', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof hz === 'function', 'hz is a Function'); - //t.deepEqual(hz(args..), 'Expected'); - //t.equal(hz(args..), 'Expected'); - //t.false(hz(args..), 'Expected'); - //t.throws(hz(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('hz is a Function', () => { + expect(hz).toBeInstanceOf(Function); +}); diff --git a/test/inRange/inRange.test.js b/test/inRange/inRange.test.js index 10b2a2bec..c72efec2d 100644 --- a/test/inRange/inRange.test.js +++ b/test/inRange/inRange.test.js @@ -1,17 +1,18 @@ -const test = require('tape'); +const expect = require('expect'); const inRange = require('./inRange.js'); -test('Testing inRange', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof inRange === 'function', 'inRange is a Function'); - t.equal(inRange(3, 2, 5), true, "The given number falls within the given range"); - t.equal(inRange(3, 4), true, "The given number falls within the given range"); - t.equal(inRange(2, 3, 5), false, "The given number does not falls within the given range"); - t.equal(inRange(3, 2), false, "The given number does not falls within the given range"); - //t.deepEqual(inRange(args..), 'Expected'); - //t.equal(inRange(args..), 'Expected'); - //t.false(inRange(args..), 'Expected'); - //t.throws(inRange(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('inRange is a Function', () => { + expect(inRange).toBeInstanceOf(Function); +}); +test('The given number falls within the given range', () => { + expect(inRange(3, 2, 5)).toBeTruthy(); +}); +test('The given number falls within the given range', () => { + expect(inRange(3, 4)).toBeTruthy(); +}); +test('The given number does not falls within the given range', () => { + expect(inRange(2, 3, 5)).toBeFalsy(); +}); +test('The given number does not falls within the given range', () => { + expect(inRange(3, 2)).toBeFalsy(); +}); diff --git a/test/indexOfAll/indexOfAll.test.js b/test/indexOfAll/indexOfAll.test.js index d9c681a65..0747df466 100644 --- a/test/indexOfAll/indexOfAll.test.js +++ b/test/indexOfAll/indexOfAll.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const indexOfAll = require('./indexOfAll.js'); -test('Testing indexOfAll', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof indexOfAll === 'function', 'indexOfAll is a Function'); - t.deepEqual(indexOfAll([1, 2, 3, 1, 2, 3], 1), [0,3], "Returns all indices of val in an array"); - t.deepEqual(indexOfAll([1, 2, 3], 4), [], "Returns all indices of val in an array"); - //t.deepEqual(indexOfAll(args..), 'Expected'); - //t.equal(indexOfAll(args..), 'Expected'); - //t.false(indexOfAll(args..), 'Expected'); - //t.throws(indexOfAll(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('indexOfAll is a Function', () => { + expect(indexOfAll).toBeInstanceOf(Function); +}); +test('Returns all indices of val in an array', () => { + expect(indexOfAll([1, 2, 3, 1, 2, 3], 1)).toEqual([0,3]); +}); +test('Returns all indices of val in an array', () => { + expect(indexOfAll([1, 2, 3], 4)).toEqual([]); +}); diff --git a/test/initial/initial.test.js b/test/initial/initial.test.js index d4b0b76d6..2c8a8b944 100644 --- a/test/initial/initial.test.js +++ b/test/initial/initial.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const initial = require('./initial.js'); -test('Testing initial', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof initial === 'function', 'initial is a Function'); - t.deepEqual(initial([1, 2, 3]), [1, 2], "Returns all the elements of an array except the last one"); - //t.deepEqual(initial(args..), 'Expected'); - //t.equal(initial(args..), 'Expected'); - //t.false(initial(args..), 'Expected'); - //t.throws(initial(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('initial is a Function', () => { + expect(initial).toBeInstanceOf(Function); +}); +test('Returns all the elements of an array except the last one', () => { + expect(initial([1, 2, 3])).toEqual([1, 2]); +}); diff --git a/test/initialize2DArray/initialize2DArray.test.js b/test/initialize2DArray/initialize2DArray.test.js index d2436a46a..c0e33de36 100644 --- a/test/initialize2DArray/initialize2DArray.test.js +++ b/test/initialize2DArray/initialize2DArray.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const initialize2DArray = require('./initialize2DArray.js'); -test('Testing initialize2DArray', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof initialize2DArray === 'function', 'initialize2DArray is a Function'); - t.deepEqual(initialize2DArray(2, 2, 0), [[0,0], [0,0]], "Initializes a 2D array of given width and height and value"); - //t.deepEqual(initialize2DArray(args..), 'Expected'); - //t.equal(initialize2DArray(args..), 'Expected'); - //t.false(initialize2DArray(args..), 'Expected'); - //t.throws(initialize2DArray(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('initialize2DArray is a Function', () => { + expect(initialize2DArray).toBeInstanceOf(Function); +}); +test('Initializes a 2D array of given width and height and value', () => { + expect(initialize2DArray(2, 2, 0)).toEqual([[0,0], [0,0]]); +}); diff --git a/test/initializeArrayWithRange/initializeArrayWithRange.test.js b/test/initializeArrayWithRange/initializeArrayWithRange.test.js index c35b1f557..8d0febed9 100644 --- a/test/initializeArrayWithRange/initializeArrayWithRange.test.js +++ b/test/initializeArrayWithRange/initializeArrayWithRange.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const initializeArrayWithRange = require('./initializeArrayWithRange.js'); -test('Testing initializeArrayWithRange', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof initializeArrayWithRange === 'function', 'initializeArrayWithRange is a Function'); - t.deepEqual(initializeArrayWithRange(5), [0, 1, 2, 3, 4, 5], "Initializes an array containing the numbers in the specified range"); - //t.deepEqual(initializeArrayWithRange(args..), 'Expected'); - //t.equal(initializeArrayWithRange(args..), 'Expected'); - //t.false(initializeArrayWithRange(args..), 'Expected'); - //t.throws(initializeArrayWithRange(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('initializeArrayWithRange is a Function', () => { + expect(initializeArrayWithRange).toBeInstanceOf(Function); +}); +test('Initializes an array containing the numbers in the specified range', () => { + expect(initializeArrayWithRange(5)).toEqual([0, 1, 2, 3, 4, 5]); +}); diff --git a/test/initializeArrayWithRangeRight/initializeArrayWithRangeRight.test.js b/test/initializeArrayWithRangeRight/initializeArrayWithRangeRight.test.js index f630da0c4..61f60f825 100644 --- a/test/initializeArrayWithRangeRight/initializeArrayWithRangeRight.test.js +++ b/test/initializeArrayWithRangeRight/initializeArrayWithRangeRight.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const initializeArrayWithRangeRight = require('./initializeArrayWithRangeRight.js'); -test('Testing initializeArrayWithRangeRight', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof initializeArrayWithRangeRight === 'function', 'initializeArrayWithRangeRight is a Function'); - //t.deepEqual(initializeArrayWithRangeRight(args..), 'Expected'); - //t.equal(initializeArrayWithRangeRight(args..), 'Expected'); - //t.false(initializeArrayWithRangeRight(args..), 'Expected'); - //t.throws(initializeArrayWithRangeRight(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('initializeArrayWithRangeRight is a Function', () => { + expect(initializeArrayWithRangeRight).toBeInstanceOf(Function); +}); diff --git a/test/initializeArrayWithValues/initializeArrayWithValues.test.js b/test/initializeArrayWithValues/initializeArrayWithValues.test.js index e4590fcaa..6b1b22eb3 100644 --- a/test/initializeArrayWithValues/initializeArrayWithValues.test.js +++ b/test/initializeArrayWithValues/initializeArrayWithValues.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const initializeArrayWithValues = require('./initializeArrayWithValues.js'); -test('Testing initializeArrayWithValues', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof initializeArrayWithValues === 'function', 'initializeArrayWithValues is a Function'); - t.deepEqual(initializeArrayWithValues(5, 2), [2, 2, 2, 2, 2], "Initializes and fills an array with the specified values"); - //t.deepEqual(initializeArrayWithValues(args..), 'Expected'); - //t.equal(initializeArrayWithValues(args..), 'Expected'); - //t.false(initializeArrayWithValues(args..), 'Expected'); - //t.throws(initializeArrayWithValues(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('initializeArrayWithValues is a Function', () => { + expect(initializeArrayWithValues).toBeInstanceOf(Function); +}); +test('Initializes and fills an array with the specified values', () => { + expect(initializeArrayWithValues(5, 2)).toEqual([2, 2, 2, 2, 2]); +}); diff --git a/test/initializeNDArray/initializeNDArray.test.js b/test/initializeNDArray/initializeNDArray.test.js index 82b015be3..df9199213 100644 --- a/test/initializeNDArray/initializeNDArray.test.js +++ b/test/initializeNDArray/initializeNDArray.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const initializeNDArray = require('./initializeNDArray.js'); -test('Testing initializeNDArray', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof initializeNDArray === 'function', 'initializeNDArray is a Function'); - //t.deepEqual(initializeNDArray(args..), 'Expected'); - //t.equal(initializeNDArray(args..), 'Expected'); - //t.false(initializeNDArray(args..), 'Expected'); - //t.throws(initializeNDArray(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('initializeNDArray is a Function', () => { + expect(initializeNDArray).toBeInstanceOf(Function); +}); diff --git a/test/intersection/intersection.test.js b/test/intersection/intersection.test.js index 065d86356..39186b7bb 100644 --- a/test/intersection/intersection.test.js +++ b/test/intersection/intersection.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const intersection = require('./intersection.js'); -test('Testing intersection', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof intersection === 'function', 'intersection is a Function'); - t.deepEqual(intersection([1, 2, 3], [4, 3, 2]), [2, 3], "Returns a list of elements that exist in both arrays"); - //t.deepEqual(intersection(args..), 'Expected'); - //t.equal(intersection(args..), 'Expected'); - //t.false(intersection(args..), 'Expected'); - //t.throws(intersection(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('intersection is a Function', () => { + expect(intersection).toBeInstanceOf(Function); +}); +test('Returns a list of elements that exist in both arrays', () => { + expect(intersection([1, 2, 3], [4, 3, 2])).toEqual([2, 3]); +}); diff --git a/test/intersectionBy/intersectionBy.test.js b/test/intersectionBy/intersectionBy.test.js index 499153b91..5d69246bd 100644 --- a/test/intersectionBy/intersectionBy.test.js +++ b/test/intersectionBy/intersectionBy.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const intersectionBy = require('./intersectionBy.js'); -test('Testing intersectionBy', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof intersectionBy === 'function', 'intersectionBy is a Function'); - t.deepEqual(intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor), [2.1], 'Returns a list of elements that exist in both arrays, after applying the provided function to each array element of both'); - //t.deepEqual(intersectionBy(args..), 'Expected'); - //t.equal(intersectionBy(args..), 'Expected'); - //t.false(intersectionBy(args..), 'Expected'); - //t.throws(intersectionBy(args..), 'Expected'); - t.end(); +test('intersectionBy is a Function', () => { + expect(intersectionBy).toBeInstanceOf(Function); +}); +test('Returns a list of elements that exist in both arrays, after applying the provided function to each array element of both', () => { + expect(intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor)).toEqual([2.1]); }); diff --git a/test/intersectionWith/intersectionWith.test.js b/test/intersectionWith/intersectionWith.test.js index 1fac234c2..7063575a7 100644 --- a/test/intersectionWith/intersectionWith.test.js +++ b/test/intersectionWith/intersectionWith.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const intersectionWith = require('./intersectionWith.js'); -test('Testing intersectionWith', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof intersectionWith === 'function', 'intersectionWith is a Function'); - t.deepEqual(intersectionWith([1, 1.2, 1.5, 3, 0], [1.9, 3, 0, 3.9], (a, b) => Math.round(a) === Math.round(b)), [1.5, 3, 0], 'Returns a list of elements that exist in both arrays, using a provided comparator function'); - //t.deepEqual(intersectionWith(args..), 'Expected'); - //t.equal(intersectionWith(args..), 'Expected'); - //t.false(intersectionWith(args..), 'Expected'); - //t.throws(intersectionWith(args..), 'Expected'); - t.end(); +test('intersectionWith is a Function', () => { + expect(intersectionWith).toBeInstanceOf(Function); +}); +test('Returns a list of elements that exist in both arrays, using a provided comparator function', () => { + expect(intersectionWith([1, 1.2, 1.5, 3, 0], [1.9, 3, 0, 3.9], (a, b) => Math.round(a) === Math.round(b))).toEqual([1.5, 3, 0]); }); diff --git a/test/invertKeyValues/invertKeyValues.test.js b/test/invertKeyValues/invertKeyValues.test.js index 948a80889..00c6d5f85 100644 --- a/test/invertKeyValues/invertKeyValues.test.js +++ b/test/invertKeyValues/invertKeyValues.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const invertKeyValues = require('./invertKeyValues.js'); -test('Testing invertKeyValues', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof invertKeyValues === 'function', 'invertKeyValues is a Function'); - t.deepEqual(invertKeyValues({ a: 1, b: 2, c: 1 }), { 1: [ 'a', 'c' ], 2: [ 'b' ] }, "invertKeyValues({ a: 1, b: 2, c: 1 }) returns { 1: [ 'a', 'c' ], 2: [ 'b' ] }"); - t.deepEqual(invertKeyValues({ a: 1, b: 2, c: 1 }, value => 'group' + value), { group1: [ 'a', 'c' ], group2: [ 'b' ] }, "invertKeyValues({ a: 1, b: 2, c: 1 }, value => 'group' + value) returns { group1: [ 'a', 'c' ], group2: [ 'b' ] }"); - //t.deepEqual(invertKeyValues(args..), 'Expected'); - //t.equal(invertKeyValues(args..), 'Expected'); - //t.false(invertKeyValues(args..), 'Expected'); - //t.throws(invertKeyValues(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('invertKeyValues is a Function', () => { + expect(invertKeyValues).toBeInstanceOf(Function); +}); +test('invertKeyValues({ a: 1, b: 2, c: 1 }) returns { 1: [ \'a\', \'c\' ], 2: [ \'b\' ] }', () => { + expect(invertKeyValues({ a: 1, b: 2, c: 1 })).toEqual({ 1: [ 'a', 'c' ], 2: [ 'b' ] }); +}); +test('invertKeyValues({ a: 1, b: 2, c: 1 }, value => \'group\' + value) returns { group1: [ \'a\', \'c\' ], group2: [ \'b\' ] }', () => { + expect(invertKeyValues({ a: 1, b: 2, c: 1 }, value => 'group' + value)).toEqual( { group1: [ 'a', 'c' ], group2: [ 'b' ] }); +}); diff --git a/test/is/is.test.js b/test/is/is.test.js index 9671e766d..5309f0c08 100644 --- a/test/is/is.test.js +++ b/test/is/is.test.js @@ -1,29 +1,54 @@ -const test = require('tape'); +const expect = require('expect'); const is = require('./is.js'); -test('Testing is', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof is === 'function', 'is is a Function'); - t.true(is(Array, [1]), `Works for arrays with data`); - t.true(is(Array, []), `Works for empty arrays`); - t.false(is(Array, {}), `Works for arrays, not objects`); - t.true(is(Object, {}), `Works for objects`); - t.true(is(Map, new Map()), `Works for maps`); - t.true(is(RegExp, /./g), `Works for regular expressions`); - t.true(is(Set, new Set()), `Works for sets`); - t.true(is(WeakMap, new WeakMap()), `Works for weak maps`); - t.true(is(WeakSet, new WeakSet()), `Works for weak sets`); - t.true(is(String, ''), `Works for strings - returns true for primitive`); - t.true(is(String, new String('')), `Works for strings - returns true when using constructor`); - t.true(is(Number, 1), `Works for numbers - returns true for primitive`); - t.true(is(Number, new Number('10')), `Works for numbers - returns true when using constructor`); - t.true(is(Boolean, false), `Works for booleans - returns true for primitive`); - t.true(is(Boolean, new Boolean(false)), `Works for booleans - returns true when using constructor`); - t.true(is(Function, () => null), `Works for functions`); - //t.deepEqual(is(args..), 'Expected'); - //t.equal(is(args..), 'Expected'); - //t.false(is(args..), 'Expected'); - //t.throws(is(args..), 'Expected'); - t.end(); +test('is is a Function', () => { + expect(is).toBeInstanceOf(Function); +}); +test('Works for arrays with data', () => { + expect(is(Array, [1])).toBeTruthy(); +}); +test('Works for empty arrays', () => { + expect(is(Array, [])).toBeTruthy(); +}); +test('Works for arrays, not objects', () => { + expect(is(Array, {})).toBeFalsy(); +}); +test('Works for objects', () => { + expect(is(Object, {})).toBeTruthy(); +}); +test('Works for maps', () => { + expect(is(Map, new Map())).toBeTruthy(); +}); +test('Works for regular expressions', () => { + expect(is(RegExp, /./g)).toBeTruthy(); +}); +test('Works for sets', () => { + expect(is(Set, new Set())).toBeTruthy(); +}); +test('Works for weak maps', () => { + expect(is(WeakMap, new WeakMap())).toBeTruthy(); +}); +test('Works for weak sets', () => { + expect(is(WeakSet, new WeakSet())).toBeTruthy(); +}); +test('Works for strings - returns true for primitive', () => { + expect(is(String, '')).toBeTruthy(); +}); +test('Works for strings - returns true when using constructor', () => { + expect(is(String, new String(''))).toBeTruthy(); +}); +test('Works for numbers - returns true for primitive', () => { + expect(is(Number, 1)).toBeTruthy(); +}); +test('Works for numbers - returns true when using constructor', () => { + expect(is(Number, new Number('10'))).toBeTruthy(); +}); +test('Works for booleans - returns true for primitive', () => { + expect(is(Boolean, false)).toBeTruthy(); +}); +test('Works for booleans - returns true when using constructor', () => { + expect(is(Boolean, new Boolean(false))).toBeTruthy(); +}); +test('Works for functions', () => { + expect(is(Function, () => null)).toBeTruthy(); }); diff --git a/test/isAbsoluteURL/isAbsoluteURL.test.js b/test/isAbsoluteURL/isAbsoluteURL.test.js index 965d48cdc..806ac881c 100644 --- a/test/isAbsoluteURL/isAbsoluteURL.test.js +++ b/test/isAbsoluteURL/isAbsoluteURL.test.js @@ -1,16 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const isAbsoluteURL = require('./isAbsoluteURL.js'); -test('Testing isAbsoluteURL', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isAbsoluteURL === 'function', 'isAbsoluteURL is a Function'); - t.equal(isAbsoluteURL('https://google.com'), true, "Given string is an absolute URL"); - t.equal(isAbsoluteURL('ftp://www.myserver.net'), true, "Given string is an absolute URL"); - t.equal(isAbsoluteURL('/foo/bar'), false, "Given string is not an absolute URL"); - //t.deepEqual(isAbsoluteURL(args..), 'Expected'); - //t.equal(isAbsoluteURL(args..), 'Expected'); - //t.false(isAbsoluteURL(args..), 'Expected'); - //t.throws(isAbsoluteURL(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isAbsoluteURL is a Function', () => { + expect(isAbsoluteURL).toBeInstanceOf(Function); +}); +test('Given string is an absolute URL', () => { + expect(isAbsoluteURL('https://google.com')).toBeTruthy(); +}); +test('Given string is an absolute URL', () => { + expect(isAbsoluteURL('ftp://www.myserver.net')).toBeTruthy(); +}); +test('Given string is not an absolute URL', () => { + expect(isAbsoluteURL('/foo/bar')).toBeFalsy(); +}); diff --git a/test/isAnagram/isAnagram.test.js b/test/isAnagram/isAnagram.test.js index 915d14aba..6fc0a9cb6 100644 --- a/test/isAnagram/isAnagram.test.js +++ b/test/isAnagram/isAnagram.test.js @@ -1,17 +1,18 @@ -const test = require('tape'); +const expect = require('expect'); const isAnagram = require('./isAnagram.js'); -test('Testing isAnagram', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isAnagram === 'function', 'isAnagram is a Function'); - t.true(isAnagram('iceman', 'cinema'), 'Checks valid anagram'); - t.true(isAnagram('rail safety', 'fairy tales'), 'Works with spaces'); - t.true(isAnagram('roast beef', 'eat for BSE'), 'Ignores case'); - t.true(isAnagram('Regera Dowdy', 'E. G. Deadworry'), 'Ignores special characters'); - //t.deepEqual(isAnagram(args..), 'Expected'); - //t.equal(isAnagram(args..), 'Expected'); - //t.false(isAnagram(args..), 'Expected'); - //t.throws(isAnagram(args..), 'Expected'); - t.end(); +test('isAnagram is a Function', () => { + expect(isAnagram).toBeInstanceOf(Function); +}); +test('Checks valid anagram', () => { + expect(isAnagram('iceman', 'cinema')).toBeTruthy(); +}); +test('Works with spaces', () => { + expect(isAnagram('rail safety', 'fairy tales')).toBeTruthy(); +}); +test('Ignores case', () => { + expect(isAnagram('roast beef', 'eat for BSE')).toBeTruthy(); +}); +test('Ignores special characters', () => { + expect(isAnagram('Regera Dowdy', 'E. G. Deadworry')).toBeTruthy(); }); diff --git a/test/isArmstrongNumber/isArmstrongNumber.test.js b/test/isArmstrongNumber/isArmstrongNumber.test.js index dbebfbfd0..946cfa76f 100644 --- a/test/isArmstrongNumber/isArmstrongNumber.test.js +++ b/test/isArmstrongNumber/isArmstrongNumber.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const isArmstrongNumber = require('./isArmstrongNumber.js'); -test('Testing isArmstrongNumber', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isArmstrongNumber === 'function', 'isArmstrongNumber is a Function'); - //t.deepEqual(isArmstrongNumber(args..), 'Expected'); - //t.equal(isArmstrongNumber(args..), 'Expected'); - //t.false(isArmstrongNumber(args..), 'Expected'); - //t.throws(isArmstrongNumber(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isArmstrongNumber is a Function', () => { + expect(isArmstrongNumber).toBeInstanceOf(Function); +}); diff --git a/test/isArray/isArray.test.js b/test/isArray/isArray.test.js index 7d56d1112..5ca77144b 100644 --- a/test/isArray/isArray.test.js +++ b/test/isArray/isArray.test.js @@ -1,14 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const isArray = require('./isArray.js'); -test('Testing isArray', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isArray === 'function', 'isArray is a Function'); - t.equal(isArray([1]), true, "passed value is an array"); - t.equal(isArray('array'), false, "passed value is not an array"); - //t.equal(isArray(args..), 'Expected'); - //t.false(isArray(args..), 'Expected'); - //t.throws(isArray(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isArray is a Function', () => { + expect(isArray).toBeInstanceOf(Function); +}); +test('passed value is an array', () => { + expect(isArray([1])).toBeTruthy(); +}); +test('passed value is not an array', () => { + expect(isArray('array')).toBeFalsy(); +}); diff --git a/test/isArrayBuffer/isArrayBuffer.test.js b/test/isArrayBuffer/isArrayBuffer.test.js index 1d9cffa97..fb65e81de 100644 --- a/test/isArrayBuffer/isArrayBuffer.test.js +++ b/test/isArrayBuffer/isArrayBuffer.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const isArrayBuffer = require('./isArrayBuffer.js'); -test('Testing isArrayBuffer', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isArrayBuffer === 'function', 'isArrayBuffer is a Function'); - //t.deepEqual(isArrayBuffer(args..), 'Expected'); - //t.equal(isArrayBuffer(args..), 'Expected'); - //t.false(isArrayBuffer(args..), 'Expected'); - //t.throws(isArrayBuffer(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isArrayBuffer is a Function', () => { + expect(isArrayBuffer).toBeInstanceOf(Function); +}); diff --git a/test/isArrayLike/isArrayLike.test.js b/test/isArrayLike/isArrayLike.test.js index 97b41b827..c2b83ecf9 100644 --- a/test/isArrayLike/isArrayLike.test.js +++ b/test/isArrayLike/isArrayLike.test.js @@ -1,16 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const isArrayLike = require('./isArrayLike.js'); -test('Testing isArrayLike', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isArrayLike === 'function', 'isArrayLike is a Function'); - t.equal(isArrayLike('abc'), true, 'Returns true for a string'); - t.equal(isArrayLike([1,2,3]), true, 'Returns true for an array'); - t.equal(isArrayLike(null), false, 'Returns false for null'); - //t.deepEqual(isArrayLike(args..), 'Expected'); - //t.equal(isArrayLike(args..), 'Expected'); - //t.false(isArrayLike(args..), 'Expected'); - //t.throws(isArrayLike(args..), 'Expected'); - t.end(); +test('isArrayLike is a Function', () => { + expect(isArrayLike).toBeInstanceOf(Function); +}); +test('Returns true for a string', () => { + expect(isArrayLike('abc')).toBeTruthy(); +}); +test('Returns true for an array', () => { + expect(isArrayLike([1,2,3])).toBeTruthy(); +}); +test('Returns false for null', () => { + expect(isArrayLike(null)).toBeFalsy(); }); diff --git a/test/isBoolean/isBoolean.test.js b/test/isBoolean/isBoolean.test.js index 68334e925..31074f1f4 100644 --- a/test/isBoolean/isBoolean.test.js +++ b/test/isBoolean/isBoolean.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const isBoolean = require('./isBoolean.js'); -test('Testing isBoolean', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isBoolean === 'function', 'isBoolean is a Function'); - t.equal(isBoolean(null), false, "passed value is not a boolean"); - t.equal(isBoolean(false), true, "passed value is not a boolean"); - //t.deepEqual(isBoolean(args..), 'Expected'); - //t.equal(isBoolean(args..), 'Expected'); - //t.false(isBoolean(args..), 'Expected'); - //t.throws(isBoolean(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isBoolean is a Function', () => { + expect(isBoolean).toBeInstanceOf(Function); +}); +test('passed value is not a boolean', () => { + expect(isBoolean(null)).toBeFalsy(); +}); +test('passed value is not a boolean', () => { + expect(isBoolean(false)).toBeTruthy(); +}); diff --git a/test/isBrowser/isBrowser.test.js b/test/isBrowser/isBrowser.test.js index 3f0c1adf9..a6c32ee74 100644 --- a/test/isBrowser/isBrowser.test.js +++ b/test/isBrowser/isBrowser.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const isBrowser = require('./isBrowser.js'); -test('Testing isBrowser', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isBrowser === 'function', 'isBrowser is a Function'); - //t.deepEqual(isBrowser(args..), 'Expected'); - //t.equal(isBrowser(args..), 'Expected'); - //t.false(isBrowser(args..), 'Expected'); - //t.throws(isBrowser(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isBrowser is a Function', () => { + expect(isBrowser).toBeInstanceOf(Function); +}); diff --git a/test/isBrowserTabFocused/isBrowserTabFocused.test.js b/test/isBrowserTabFocused/isBrowserTabFocused.test.js index d3a5b5133..780a52095 100644 --- a/test/isBrowserTabFocused/isBrowserTabFocused.test.js +++ b/test/isBrowserTabFocused/isBrowserTabFocused.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const isBrowserTabFocused = require('./isBrowserTabFocused.js'); -test('Testing isBrowserTabFocused', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isBrowserTabFocused === 'function', 'isBrowserTabFocused is a Function'); - //t.deepEqual(isBrowserTabFocused(args..), 'Expected'); - //t.equal(isBrowserTabFocused(args..), 'Expected'); - //t.false(isBrowserTabFocused(args..), 'Expected'); - //t.throws(isBrowserTabFocused(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isBrowserTabFocused is a Function', () => { + expect(isBrowserTabFocused).toBeInstanceOf(Function); +}); diff --git a/test/isDivisible/isDivisible.test.js b/test/isDivisible/isDivisible.test.js index bdfa8a5c2..3f71c4f03 100644 --- a/test/isDivisible/isDivisible.test.js +++ b/test/isDivisible/isDivisible.test.js @@ -1,13 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const isDivisible = require('./isDivisible.js'); -test('Testing isDivisible', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isDivisible === 'function', 'isDivisible is a Function'); - t.equal(isDivisible(6, 3), true, 'The number 6 is divisible by 3'); - //t.deepEqual(isDivisible(args..), 'Expected'); - //t.false(isDivisible(args..), 'Expected'); - //t.throws(isDivisible(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isDivisible is a Function', () => { + expect(isDivisible).toBeInstanceOf(Function); +}); +test('The number 6 is divisible by 3', () => { + expect(isDivisible(6, 3)).toBeTruthy(); +}); + diff --git a/test/isEmpty/isEmpty.test.js b/test/isEmpty/isEmpty.test.js index 76fc0aef8..da27a5581 100644 --- a/test/isEmpty/isEmpty.test.js +++ b/test/isEmpty/isEmpty.test.js @@ -1,23 +1,36 @@ -const test = require('tape'); +const expect = require('expect'); const isEmpty = require('./isEmpty.js'); -test('Testing isEmpty', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isEmpty === 'function', 'isEmpty is a Function'); - t.equal(isEmpty(new Map()), true, 'Returns true for empty Map'); - t.equal(isEmpty(new Set()), true, 'Returns true for empty Set'); - t.equal(isEmpty([]), true, 'Returns true for empty array'); - t.equal(isEmpty({}), true, 'Returns true for empty object'); - t.equal(isEmpty(''), true, 'Returns true for empty string'); - t.equal(isEmpty([1, 2]), false, 'Returns false for non-empty array'); - t.equal(isEmpty({ a: 1, b: 2 }), false, 'Returns false for non-empty object'); - t.equal(isEmpty('text'), false, 'Returns false for non-empty string'); - t.equal(isEmpty(123), true, 'Returns true - type is not considered a collection'); - t.equal(isEmpty(true), true, 'Returns true - type is not considered a collection'); - //t.deepEqual(isEmpty(args..), 'Expected'); - //t.equal(isEmpty(args..), 'Expected'); - //t.false(isEmpty(args..), 'Expected'); - //t.throws(isEmpty(args..), 'Expected'); - t.end(); +test('isEmpty is a Function', () => { + expect(isEmpty).toBeInstanceOf(Function); +}); +test('Returns true for empty Map', () => { + expect(isEmpty(new Map())).toBeTruthy(); +}); +test('Returns true for empty Set', () => { + expect(isEmpty(new Set())).toBeTruthy(); +}); +test('Returns true for empty array', () => { + expect(isEmpty([])).toBeTruthy(); +}); +test('Returns true for empty object', () => { + expect(isEmpty({})).toBeTruthy(); +}); +test('Returns true for empty string', () => { + expect(isEmpty('')).toBeTruthy(); +}); +test('Returns false for non-empty array', () => { + expect(isEmpty([1, 2])).toBeFalsy(); +}); +test('Returns false for non-empty object', () => { + expect(isEmpty({ a: 1, b: 2 })).toBeFalsy(); +}); +test('Returns false for non-empty string', () => { + expect(isEmpty('text')).toBeFalsy(); +}); +test('Returns true - type is not considered a collection', () => { + expect(isEmpty(123)).toBeTruthy(); +}); +test('Returns true - type is not considered a collection', () => { + expect(isEmpty(true)).toBeTruthy(); }); diff --git a/test/isEven/isEven.test.js b/test/isEven/isEven.test.js index 8c9e29455..906f42b7b 100644 --- a/test/isEven/isEven.test.js +++ b/test/isEven/isEven.test.js @@ -1,13 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const isEven = require('./isEven.js'); -test('Testing isEven', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isEven === 'function', 'isEven is a Function'); - t.equal(isEven(4), true, '4 is even number'); - t.false(isEven(5), false, '5 is not an even number'); - //t.deepEqual(isEven(args..), 'Expected'); - //t.throws(isEven(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isEven is a Function', () => { + expect(isEven).toBeInstanceOf(Function); +}); +test('4 is even number', () => { + expect(isEven(4)).toBeTruthy(); +}); +test('5 is not an even number', () => { + expect(isEven(5)).toBeFalsy(); +}); diff --git a/test/isFunction/isFunction.test.js b/test/isFunction/isFunction.test.js index 7311b25d4..2d6d8db81 100644 --- a/test/isFunction/isFunction.test.js +++ b/test/isFunction/isFunction.test.js @@ -1,14 +1,13 @@ -const test = require('tape'); +const expect = require('expect'); const isFunction = require('./isFunction.js'); -test('Testing isFunction', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isFunction === 'function', 'isFunction is a Function'); - t.equal(isFunction(x => x), true, "passed value is a function"); - t.equal(isFunction('x'), false, "passed value is not a function"); - //t.equal(isFunction(args..), 'Expected'); - //t.false(isFunction(args..), 'Expected'); - //t.throws(isFunction(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isFunction is a Function', () => { + expect(isFunction).toBeInstanceOf(Function); +}); +test('passed value is a function', () => { + expect(isFunction(x => x)).toBeTruthy(); +}); +test('passed value is not a function', () => { + expect(isFunction('x')).toBeFalsy(); +}); + diff --git a/test/isLowerCase/isLowerCase.test.js b/test/isLowerCase/isLowerCase.test.js index 0e596dff9..9c6542476 100644 --- a/test/isLowerCase/isLowerCase.test.js +++ b/test/isLowerCase/isLowerCase.test.js @@ -1,16 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const isLowerCase = require('./isLowerCase.js'); -test('Testing isLowerCase', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isLowerCase === 'function', 'isLowerCase is a Function'); - t.equal(isLowerCase('abc'), true, "passed string is a lowercase"); - t.equal(isLowerCase('a3@$'), true, "passed string is a lowercase"); - t.equal(isLowerCase('A3@$'), false, "passed value is not a lowercase"); - //t.deepEqual(isLowerCase(args..), 'Expected'); - //t.equal(isLowerCase(args..), 'Expected'); - //t.false(isLowerCase(args..), 'Expected'); - //t.throws(isLowerCase(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isLowerCase is a Function', () => { + expect(isLowerCase).toBeInstanceOf(Function); +}); +test('passed string is a lowercase', () => { + expect(isLowerCase('abc')).toBeTruthy(); +}); +test('passed string is a lowercase', () => { + expect(isLowerCase('a3@$')).toBeTruthy(); +}); +test('passed value is not a lowercase', () => { + expect(isLowerCase('A3@$')).toBeFalsy(); +}); diff --git a/test/isMap/isMap.test.js b/test/isMap/isMap.test.js index bc9fe3187..e6e434636 100644 --- a/test/isMap/isMap.test.js +++ b/test/isMap/isMap.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const isMap = require('./isMap.js'); -test('Testing isMap', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isMap === 'function', 'isMap is a Function'); - //t.deepEqual(isMap(args..), 'Expected'); - //t.equal(isMap(args..), 'Expected'); - //t.false(isMap(args..), 'Expected'); - //t.throws(isMap(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isMap is a Function', () => { + expect(isMap).toBeInstanceOf(Function); +}); diff --git a/test/isNil/isNil.test.js b/test/isNil/isNil.test.js index c5e11d1f4..be77815a2 100644 --- a/test/isNil/isNil.test.js +++ b/test/isNil/isNil.test.js @@ -1,16 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const isNil = require('./isNil.js'); -test('Testing isNil', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isNil === 'function', 'isNil is a Function'); - t.equal(isNil(null), true, 'Returns true for null'); - t.equal(isNil(undefined), true, 'Returns true for undefined'); - t.equal(isNil(''), false, 'Returns false for an empty string'); - //t.deepEqual(isNil(args..), 'Expected'); - //t.equal(isNil(args..), 'Expected'); - //t.false(isNil(args..), 'Expected'); - //t.throws(isNil(args..), 'Expected'); - t.end(); +test('isNil is a Function', () => { + expect(isNil).toBeInstanceOf(Function); +}); +test('Returns true for null', () => { + expect(isNil(null)).toBeTruthy(); +}); +test('Returns true for undefined', () => { + expect(isNil(undefined)).toBeTruthy(); +}); +test('Returns false for an empty string', () => { + expect(isNil('')).toBeFalsy(); }); diff --git a/test/isNull/isNull.test.js b/test/isNull/isNull.test.js index dbc7d20c8..fdf97d069 100644 --- a/test/isNull/isNull.test.js +++ b/test/isNull/isNull.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const isNull = require('./isNull.js'); -test('Testing isNull', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isNull === 'function', 'isNull is a Function'); - t.equal(isNull(null), true, "passed argument is a null"); - t.equal(isNull(NaN), false, "passed argument is a null"); - //t.deepEqual(isNull(args..), 'Expected'); - //t.equal(isNull(args..), 'Expected'); - //t.false(isNull(args..), 'Expected'); - //t.throws(isNull(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isNull is a Function', () => { + expect(isNull).toBeInstanceOf(Function); +}); +test('passed argument is a null', () => { + expect(isNull(null)).toBeTruthy(); +}); +test('passed argument is a null', () => { + expect(isNull(NaN)).toBeFalsy(); +}); diff --git a/test/isNumber/isNumber.test.js b/test/isNumber/isNumber.test.js index 90af5bb5b..9b4872778 100644 --- a/test/isNumber/isNumber.test.js +++ b/test/isNumber/isNumber.test.js @@ -1,16 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const isNumber = require('./isNumber.js'); -test('Testing isNumber', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isNumber === 'function', 'isNumber is a Function'); - t.equal(isNumber(1), true, "passed argument is a number"); - t.equal(isNumber('1'), false, "passed argument is not a number"); - - //t.deepEqual(isNumber(args..), 'Expected'); - //t.equal(isNumber(args..), 'Expected'); - //t.false(isNumber(args..), 'Expected'); - //t.throws(isNumber(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isNumber is a Function', () => { + expect(isNumber).toBeInstanceOf(Function); +}); +test('passed argument is a number', () => { + expect(isNumber(1)).toBeTruthy(); +}); +test('passed argument is not a number', () => { + expect(isNumber('1')).toBeFalsy(); +}); diff --git a/test/isObject/isObject.test.js b/test/isObject/isObject.test.js index 8ed7620c8..d5e58c496 100644 --- a/test/isObject/isObject.test.js +++ b/test/isObject/isObject.test.js @@ -1,19 +1,19 @@ -const test = require('tape'); +const expect = require('expect'); const isObject = require('./isObject.js'); -test('Testing isObject', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isObject === 'function', 'isObject is a Function'); - - t.true(isObject([1, 2, 3, 4]), 'isObject([1, 2, 3, 4]) is a object'); - t.true(isObject([]), 'isObject([]) is a object'); - t.true(isObject({ a:1 }), 'isObject({ a:1 }) is a object'); - t.false(isObject(true), 'isObject(true) is not a object'); - - //t.deepEqual(isObject(args..), 'Expected'); - //t.equal(isObject(args..), 'Expected'); - //t.false(isObject(args..), 'Expected'); - //t.throws(isObject(args..), 'Expected'); - t.end(); +test('isObject is a Function', () => { + expect(isObject).toBeInstanceOf(Function); }); +test('isObject([1, 2, 3, 4]) is a object', () => { + expect(isObject([1, 2, 3, 4])).toBeTruthy(); +}); +test('isObject([]) is a object', () => { + expect(isObject([])).toBeTruthy(); +}); +test('isObject({ a:1 }) is a object', () => { + expect(isObject({ a:1 })).toBeTruthy(); +}); +test('isObject(true) is not a object', () => { + expect(isObject(true)).toBeFalsy(); +}); + diff --git a/test/isObjectLike/isObjectLike.test.js b/test/isObjectLike/isObjectLike.test.js index fe414423b..410878d8e 100644 --- a/test/isObjectLike/isObjectLike.test.js +++ b/test/isObjectLike/isObjectLike.test.js @@ -1,17 +1,18 @@ -const test = require('tape'); +const expect = require('expect'); const isObjectLike = require('./isObjectLike.js'); -test('Testing isObjectLike', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isObjectLike === 'function', 'isObjectLike is a Function'); - t.equal(isObjectLike({}), true, 'Returns true for an object'); - t.equal(isObjectLike([1, 2, 3]), true, 'Returns true for an array'); - t.equal(isObjectLike(x => x), false, 'Returns false for a function'); - t.equal(isObjectLike(null), false, 'Returns false for null'); - //t.deepEqual(isObjectLike(args..), 'Expected'); - //t.equal(isObjectLike(args..), 'Expected'); - //t.false(isObjectLike(args..), 'Expected'); - //t.throws(isObjectLike(args..), 'Expected'); - t.end(); +test('isObjectLike is a Function', () => { + expect(isObjectLike).toBeInstanceOf(Function); +}); +test('Returns true for an object', () => { + expect(isObjectLike({})).toBeTruthy(); +}); +test('Returns true for an array', () => { + expect(isObjectLike([1, 2, 3])).toBeTruthy(); +}); +test('Returns false for a function', () => { + expect(isObjectLike(x => x)).toBeFalsy(); +}); +test('Returns false for null', () => { + expect(isObjectLike(null)).toBeFalsy(); }); diff --git a/test/isPlainObject/isPlainObject.test.js b/test/isPlainObject/isPlainObject.test.js index 515b61b2d..eda33dabc 100644 --- a/test/isPlainObject/isPlainObject.test.js +++ b/test/isPlainObject/isPlainObject.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const isPlainObject = require('./isPlainObject.js'); -test('Testing isPlainObject', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isPlainObject === 'function', 'isPlainObject is a Function'); - t.equal(isPlainObject({ a: 1 }), true, 'Returns true for a plain object'); - t.equal(isPlainObject(new Map()), false, 'Returns false for a Map (example of non-plain object)'); - //t.deepEqual(isPlainObject(args..), 'Expected'); - //t.equal(isPlainObject(args..), 'Expected'); - //t.false(isPlainObject(args..), 'Expected'); - //t.throws(isPlainObject(args..), 'Expected'); - t.end(); +test('isPlainObject is a Function', () => { + expect(isPlainObject).toBeInstanceOf(Function); +}); +test('Returns true for a plain object', () => { + expect(isPlainObject({ a: 1 })).toBeTruthy(); +}); +test('Returns false for a Map (example of non-plain object)', () => { + expect(isPlainObject(new Map())).toBeFalsy(); }); diff --git a/test/isPrime/isPrime.test.js b/test/isPrime/isPrime.test.js index 8d7ce3b8b..f6776f687 100644 --- a/test/isPrime/isPrime.test.js +++ b/test/isPrime/isPrime.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const isPrime = require('./isPrime.js'); -test('Testing isPrime', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isPrime === 'function', 'isPrime is a Function'); - t.equal(isPrime(11), true, "passed number is a prime"); - //t.deepEqual(isPrime(args..), 'Expected'); - //t.equal(isPrime(args..), 'Expected'); - //t.false(isPrime(args..), 'Expected'); - //t.throws(isPrime(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isPrime is a Function', () => { + expect(isPrime).toBeInstanceOf(Function); +}); +test('passed number is a prime', () => { + expect(isPrime(11)).toBeTruthy(); +}); diff --git a/test/isPrimitive/isPrimitive.test.js b/test/isPrimitive/isPrimitive.test.js index 3e0a21076..ac7e593e9 100644 --- a/test/isPrimitive/isPrimitive.test.js +++ b/test/isPrimitive/isPrimitive.test.js @@ -1,24 +1,42 @@ -const test = require('tape'); +const expect = require('expect'); const isPrimitive = require('./isPrimitive.js'); -test('Testing isPrimitive', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isPrimitive === 'function', 'isPrimitive is a Function'); - t.true(isPrimitive(null), "isPrimitive(null) is primitive"); - t.true(isPrimitive(undefined), "isPrimitive(undefined) is primitive"); - t.true(isPrimitive('string'), "isPrimitive(string) is primitive"); - t.true(isPrimitive(true), "isPrimitive(true) is primitive"); - t.true(isPrimitive(50), "isPrimitive(50) is primitive"); - t.true(isPrimitive('Hello'), "isPrimitive('Hello') is primitive"); - t.true(isPrimitive(false), "isPrimitive(false) is primitive"); - t.true(isPrimitive(Symbol()), "isPrimitive(Symbol()) is primitive"); - t.false(isPrimitive([1, 2, 3]), "isPrimitive([1, 2, 3]) is not primitive"); - t.false(isPrimitive({ a: 123 }), "isPrimitive({ a: 123 }) is not primitive"); - - let start = new Date().getTime(); - isPrimitive({ a: 123 }); - let end = new Date().getTime(); - t.true((end - start) < 2000, 'isPrimitive({ a: 123 }) takes less than 2s to run'); - t.end(); -}); \ No newline at end of file +test('isPrimitive is a Function', () => { + expect(isPrimitive).toBeInstanceOf(Function); +}); +test('isPrimitive(null) is primitive', () => { + expect(isPrimitive(null)).toBeTruthy(); +}); +test('isPrimitive(undefined) is primitive', () => { + expect(isPrimitive(undefined)).toBeTruthy(); +}); +test('isPrimitive(string) is primitive', () => { + expect(isPrimitive('string')).toBeTruthy(); +}); +test('isPrimitive(true) is primitive', () => { + expect(isPrimitive(true)).toBeTruthy(); +}); +test('isPrimitive(50) is primitive', () => { + expect(isPrimitive(50)).toBeTruthy(); +}); +test('isPrimitive(\'Hello\') is primitive', () => { + expect(isPrimitive('Hello')).toBeTruthy(); +}); +test('isPrimitive(false) is primitive', () => { + expect(isPrimitive(false)).toBeTruthy(); +}); +test('isPrimitive(Symbol()) is primitive', () => { + expect(isPrimitive(Symbol())).toBeTruthy(); +}); +test('isPrimitive([1, 2, 3]) is not primitive', () => { + expect(isPrimitive([1, 2, 3])).toBeFalsy(); +}); +test('isPrimitive({ a: 123 }) is not primitive', () => { + expect(isPrimitive({ a: 123 })).toBeFalsy(); +}); +let start = new Date().getTime(); +isPrimitive({ a: 123 }); +let end = new Date().getTime(); +test('isPrimitive({ a: 123 }) takes less than 2s to run', () => { + expect((end - start) < 2000).toBeTruthy(); +}); diff --git a/test/isPromiseLike/isPromiseLike.test.js b/test/isPromiseLike/isPromiseLike.test.js index 5ce5d856b..10877b4ec 100644 --- a/test/isPromiseLike/isPromiseLike.test.js +++ b/test/isPromiseLike/isPromiseLike.test.js @@ -1,20 +1,16 @@ -const test = require('tape'); +const expect = require('expect'); const isPromiseLike = require('./isPromiseLike.js'); -test('Testing isPromiseLike', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isPromiseLike === 'function', 'isPromiseLike is a Function'); - t.equal(isPromiseLike({ +test('isPromiseLike is a Function', () => { + expect(isPromiseLike).toBeInstanceOf(Function); +}); +test('Returns true for a promise-like object', () => { + expect(isPromiseLike({ then: function() { return ''; } - }), true, 'Returns true for a promise-like object'); - t.equal(isPromiseLike(null), false, 'Returns false for null'); - t.equal(isPromiseLike({}), false, 'Returns false for an empty object'); - //t.deepEqual(isPromiseLike(args..), 'Expected'); - //t.equal(isPromiseLike(args..), 'Expected'); - //t.false(isPromiseLike(args..), 'Expected'); - //t.throws(isPromiseLike(args..), 'Expected'); - t.end(); + })).toBeTruthy(); +}); +test('Returns false for an empty object', () => { + expect(isPromiseLike({})).toBeFalsy(); }); diff --git a/test/isRegExp/isRegExp.test.js b/test/isRegExp/isRegExp.test.js index 2580a138d..ec565713f 100644 --- a/test/isRegExp/isRegExp.test.js +++ b/test/isRegExp/isRegExp.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const isRegExp = require('./isRegExp.js'); -test('Testing isRegExp', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isRegExp === 'function', 'isRegExp is a Function'); - //t.deepEqual(isRegExp(args..), 'Expected'); - //t.equal(isRegExp(args..), 'Expected'); - //t.false(isRegExp(args..), 'Expected'); - //t.throws(isRegExp(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isRegExp is a Function', () => { + expect(isRegExp).toBeInstanceOf(Function); +}); diff --git a/test/isSet/isSet.test.js b/test/isSet/isSet.test.js index 81fae132b..559889443 100644 --- a/test/isSet/isSet.test.js +++ b/test/isSet/isSet.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const isSet = require('./isSet.js'); -test('Testing isSet', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isSet === 'function', 'isSet is a Function'); - //t.deepEqual(isSet(args..), 'Expected'); - //t.equal(isSet(args..), 'Expected'); - //t.false(isSet(args..), 'Expected'); - //t.throws(isSet(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isSet is a Function', () => { + expect(isSet).toBeInstanceOf(Function); +}); diff --git a/test/isSimilar/isSimilar.test.js b/test/isSimilar/isSimilar.test.js index bcc980a18..0a632774e 100644 --- a/test/isSimilar/isSimilar.test.js +++ b/test/isSimilar/isSimilar.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const isSimilar = require('./isSimilar.js'); -test('Testing isSimilar', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isSimilar === 'function', 'isSimilar is a Function'); - //t.deepEqual(isSimilar(args..), 'Expected'); - //t.equal(isSimilar(args..), 'Expected'); - //t.false(isSimilar(args..), 'Expected'); - //t.throws(isSimilar(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isSimilar is a Function', () => { + expect(isSimilar).toBeInstanceOf(Function); +}); diff --git a/test/isSorted/isSorted.test.js b/test/isSorted/isSorted.test.js index a55dfe962..d1d9fcfd9 100644 --- a/test/isSorted/isSorted.test.js +++ b/test/isSorted/isSorted.test.js @@ -1,23 +1,39 @@ -const test = require('tape'); +const expect = require('expect'); const isSorted = require('./isSorted.js'); -test('Testing isSorted', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isSorted === 'function', 'isSorted is a Function'); - //t.deepEqual(isSorted(args..), 'Expected'); - t.equal(isSorted([0, 1, 2]), 1, 'Array is sorted in ascending order'); - t.equal(isSorted([0, 1, 2, 2]), 1, 'Array is sorted in ascending order'); - t.equal(isSorted([-4, -3, -2]), 1, 'Array is sorted in ascending order'); - t.equal(isSorted([0, 0, 1, 2]), 1, 'Array is sorted in ascending order'); - t.equal(isSorted([2, 1, 0]), -1, 'Array is sorted in descending order'); - t.equal(isSorted([2, 2, 1, 0]), -1, 'Array is sorted in descending order'); - t.equal(isSorted([-2, -3, -4]), -1, 'Array is sorted in descending order'); - t.equal(isSorted([2, 1, 0, 0]), -1, 'Array is sorted in descending order'); - t.equal(isSorted([]), undefined, 'Array is empty'); - t.equal(isSorted([1]), 0, 'Array is not sorted, direction changed in array'); - t.equal(isSorted([1, 2, 1]), 0, 'Array is not sorted, direction changed in array'); - //t.false(isSorted(args..), 'Expected'); - //t.throws(isSorted(args..), 'Expected'); - t.end(); +test('isSorted is a Function', () => { + expect(isSorted).toBeInstanceOf(Function); +}); +test('Array is sorted in ascending order', () => { + expect(isSorted([0, 1, 2])).toBe(1); +}); +test('Array is sorted in ascending order', () => { + expect(isSorted([0, 1, 2, 2])).toBe(1); +}); +test('Array is sorted in ascending order', () => { + expect(isSorted([-4, -3, -2])).toBe(1); +}); +test('Array is sorted in ascending order', () => { + expect(isSorted([0, 0, 1, 2])).toBe(1); +}); +test('Array is sorted in descending order', () => { + expect(isSorted([2, 1, 0])).toBe(-1); +}); +test('Array is sorted in descending order', () => { + expect(isSorted([2, 2, 1, 0])).toBe(-1); +}); +test('Array is sorted in descending order', () => { + expect(isSorted([-2, -3, -4])).toBe(-1); +}); +test('Array is sorted in descending order', () => { + expect(isSorted([2, 1, 0, 0])).toBe(-1); +}); +test('Array is empty', () => { + expect(isSorted([])).toBe(undefined); +}); +test('Array is not sorted, direction changed in array', () => { + expect(isSorted([1])).toBe(0); +}); +test('Array is not sorted, direction changed in array', () => { + expect(isSorted([1, 2, 1])).toBe(0); }); diff --git a/test/isString/isString.test.js b/test/isString/isString.test.js index f48d8cfe0..d3021b275 100644 --- a/test/isString/isString.test.js +++ b/test/isString/isString.test.js @@ -1,19 +1,21 @@ -const test = require('tape'); +const expect = require('expect'); const isString = require('./isString.js'); -test('Testing isString', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isString === 'function', 'isString is a Function'); - t.equal(isString('foo'), true, 'foo is a string'); - t.equal(isString('10'), true, '"10" is a string'); - t.equal(isString(''), true, 'Empty string is a string'); - t.equal(isString(10), false, '10 is not a string'); - t.equal(isString(true), false, 'true is not string'); - - //t.deepEqual(isString(args..), 'Expected'); - //t.equal(isString(args..), 'Expected'); - //t.false(isString(args..), 'Expected'); - //t.throws(isString(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isString is a Function', () => { + expect(isString).toBeInstanceOf(Function); +}); +test('foo is a string', () => { + expect(isString('foo')).toBeTruthy(); +}); +test('"10" is a string', () => { + expect(isString('10')).toBeTruthy(); +}); +test('Empty string is a string', () => { + expect(isString('')).toBeTruthy(); +}); +test('10 is not a string', () => { + expect(isString(10)).toBeFalsy(); +}); +test('true is not string', () => { + expect(isString(true)).toBeFalsy(); +}); diff --git a/test/isSymbol/isSymbol.test.js b/test/isSymbol/isSymbol.test.js index 24a4defdf..7b614771b 100644 --- a/test/isSymbol/isSymbol.test.js +++ b/test/isSymbol/isSymbol.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const isSymbol = require('./isSymbol.js'); -test('Testing isSymbol', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isSymbol === 'function', 'isSymbol is a Function'); - t.equal(isSymbol(Symbol('x')), true, "Checks if the given argument is a symbol"); - //t.deepEqual(isSymbol(args..), 'Expected'); - //t.equal(isSymbol(args..), 'Expected'); - //t.false(isSymbol(args..), 'Expected'); - //t.throws(isSymbol(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isSymbol is a Function', () => { + expect(isSymbol).toBeInstanceOf(Function); +}); +test('Checks if the given argument is a symbol', () => { + expect(isSymbol(Symbol('x'))).toBeTruthy(); +}); diff --git a/test/isTravisCI/isTravisCI.test.js b/test/isTravisCI/isTravisCI.test.js index c807bcd67..3417f7776 100644 --- a/test/isTravisCI/isTravisCI.test.js +++ b/test/isTravisCI/isTravisCI.test.js @@ -1,17 +1,14 @@ -const test = require('tape'); +const expect = require('expect'); const isTravisCI = require('./isTravisCI.js'); -test('Testing isTravisCI', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isTravisCI === 'function', 'isTravisCI is a Function'); - if(isTravisCI()) - t.true(isTravisCI(), 'Running on Travis, correctly evaluates'); - else - t.false(isTravisCI(), 'Not running on Travis, correctly evaluates'); - //t.deepEqual(isTravisCI(args..), 'Expected'); - //t.equal(isTravisCI(args..), 'Expected'); - //t.false(isTravisCI(args..), 'Expected'); - //t.throws(isTravisCI(args..), 'Expected'); - t.end(); +test('isTravisCI is a Function', () => { + expect(isTravisCI).toBeInstanceOf(Function); }); +if(isTravisCI()) + test('Running on Travis, correctly evaluates', () => { + expect(isTravisCI()).toBeTruthy(); + }); +else + test('Not running on Travis, correctly evaluates', () => { + expect(isTravisCI()).toBeFalsy(); + }); diff --git a/test/isTypedArray/isTypedArray.test.js b/test/isTypedArray/isTypedArray.test.js index 75253822d..4264f8835 100644 --- a/test/isTypedArray/isTypedArray.test.js +++ b/test/isTypedArray/isTypedArray.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const isTypedArray = require('./isTypedArray.js'); -test('Testing isTypedArray', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isTypedArray === 'function', 'isTypedArray is a Function'); - //t.deepEqual(isTypedArray(args..), 'Expected'); - //t.equal(isTypedArray(args..), 'Expected'); - //t.false(isTypedArray(args..), 'Expected'); - //t.throws(isTypedArray(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isTypedArray is a Function', () => { + expect(isTypedArray).toBeInstanceOf(Function); +}); diff --git a/test/isUndefined/isUndefined.test.js b/test/isUndefined/isUndefined.test.js index 43029fcf8..60a725190 100644 --- a/test/isUndefined/isUndefined.test.js +++ b/test/isUndefined/isUndefined.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const isUndefined = require('./isUndefined.js'); -test('Testing isUndefined', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isUndefined === 'function', 'isUndefined is a Function'); - t.true(isUndefined(undefined), 'Returns true for undefined'); - //t.deepEqual(isUndefined(args..), 'Expected'); - //t.equal(isUndefined(args..), 'Expected'); - //t.false(isUndefined(args..), 'Expected'); - //t.throws(isUndefined(args..), 'Expected'); - t.end(); +test('isUndefined is a Function', () => { + expect(isUndefined).toBeInstanceOf(Function); +}); +test('Returns true for undefined', () => { + expect(isUndefined(undefined)).toBeTruthy(); }); diff --git a/test/isUpperCase/isUpperCase.test.js b/test/isUpperCase/isUpperCase.test.js index a0b8e8a89..d094ca53e 100644 --- a/test/isUpperCase/isUpperCase.test.js +++ b/test/isUpperCase/isUpperCase.test.js @@ -1,15 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const isUpperCase = require('./isUpperCase.js'); -test('Testing isUpperCase', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isUpperCase === 'function', 'isUpperCase is a Function'); - //t.deepEqual(isUpperCase(args..), 'Expected'); - t.equal(isUpperCase('ABC'), true, 'ABC is all upper case'); - t.equal(isUpperCase('abc'), false, 'abc is not all upper case'); - t.equal(isUpperCase('A3@$'), true, 'A3@$ is all uppercase'); - //t.false(isUpperCase(args..), 'Expected'); - //t.throws(isUpperCase(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isUpperCase is a Function', () => { + expect(isUpperCase).toBeInstanceOf(Function); +}); +test('ABC is all upper case', () => { + expect(isUpperCase('ABC')).toBeTruthy(); +}); + test('abc is not all upper case', () => { + expect(isUpperCase('abc')).toBeFalsy(); +}); + test('A3@$ is all uppercase', () => { + expect(isUpperCase('A3@$')).toBeTruthy(); +}); diff --git a/test/isValidJSON/isValidJSON.test.js b/test/isValidJSON/isValidJSON.test.js index b0ad1dac5..6426d77ab 100644 --- a/test/isValidJSON/isValidJSON.test.js +++ b/test/isValidJSON/isValidJSON.test.js @@ -1,16 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const isValidJSON = require('./isValidJSON.js'); -test('Testing isValidJSON', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isValidJSON === 'function', 'isValidJSON is a Function'); - t.equal(isValidJSON('{"name":"Adam","age":20}'), true, '{"name":"Adam","age":20} is a valid JSON'); - t.equal(isValidJSON('{"name":"Adam",age:"20"}'), false, '{"name":"Adam",age:"20"} is not a valid JSON'); - t.equal(isValidJSON(null), true, 'null is a valid JSON'); - //t.deepEqual(isValidJSON(args..), 'Expected'); - //t.equal(isValidJSON(args..), 'Expected'); - //t.false(isValidJSON(args..), 'Expected'); - //t.throws(isValidJSON(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isValidJSON is a Function', () => { + expect(isValidJSON).toBeInstanceOf(Function); +}); +test('{"name":"Adam","age":20} is a valid JSON', () => { + expect(isValidJSON('{"name":"Adam","age":20}')).toBeTruthy(); +}); +test('{"name":"Adam",age:"20"} is not a valid JSON', () => { + expect(isValidJSON('{"name":"Adam",age:"20"}')).toBeFalsy(); +}); +test('null is a valid JSON', () => { + expect(isValidJSON(null)).toBeTruthy(); +}); diff --git a/test/isWeakMap/isWeakMap.test.js b/test/isWeakMap/isWeakMap.test.js index 72bb4544a..6643677e9 100644 --- a/test/isWeakMap/isWeakMap.test.js +++ b/test/isWeakMap/isWeakMap.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const isWeakMap = require('./isWeakMap.js'); -test('Testing isWeakMap', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isWeakMap === 'function', 'isWeakMap is a Function'); - //t.deepEqual(isWeakMap(args..), 'Expected'); - //t.equal(isWeakMap(args..), 'Expected'); - //t.false(isWeakMap(args..), 'Expected'); - //t.throws(isWeakMap(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isWeakMap is a Function', () => { + expect(isWeakMap).toBeInstanceOf(Function); +}); diff --git a/test/isWeakSet/isWeakSet.test.js b/test/isWeakSet/isWeakSet.test.js index 3bb390cde..2466138af 100644 --- a/test/isWeakSet/isWeakSet.test.js +++ b/test/isWeakSet/isWeakSet.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const isWeakSet = require('./isWeakSet.js'); -test('Testing isWeakSet', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof isWeakSet === 'function', 'isWeakSet is a Function'); - //t.deepEqual(isWeakSet(args..), 'Expected'); - //t.equal(isWeakSet(args..), 'Expected'); - //t.false(isWeakSet(args..), 'Expected'); - //t.throws(isWeakSet(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('isWeakSet is a Function', () => { + expect(isWeakSet).toBeInstanceOf(Function); +}); diff --git a/test/join/join.test.js b/test/join/join.test.js index 385ef56b8..d9bf08285 100644 --- a/test/join/join.test.js +++ b/test/join/join.test.js @@ -1,17 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const join = require('./join.js'); -test('Testing join', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof join === 'function', 'join is a Function'); - t.deepEqual(join(['pen', 'pineapple', 'apple', 'pen'], ',', '&'), "pen,pineapple,apple&pen", "Joins all elements of an array into a string and returns this string"); - t.deepEqual(join(['pen', 'pineapple', 'apple', 'pen'], ','), "pen,pineapple,apple,pen", "Joins all elements of an array into a string and returns this string"); - t.deepEqual(join(['pen', 'pineapple', 'apple', 'pen']), "pen,pineapple,apple,pen", "Joins all elements of an array into a string and returns this string"); - - //t.deepEqual(join(args..), 'Expected'); - //t.equal(join(args..), 'Expected'); - //t.false(join(args..), 'Expected'); - //t.throws(join(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('join is a Function', () => { + expect(join).toBeInstanceOf(Function); +}); +test('Joins all elements of an array into a string and returns this string', () => { + expect(join(['pen', 'pineapple', 'apple', 'pen'], ',', '&')).toEqual('pen,pineapple,apple&pen'); +}); +test('Joins all elements of an array into a string and returns this string', () => { + expect(join(['pen', 'pineapple', 'apple', 'pen'], ',')).toEqual('pen,pineapple,apple,pen'); +}); +test('Joins all elements of an array into a string and returns this string', () => { + expect(join(['pen', 'pineapple', 'apple', 'pen'])).toEqual('pen,pineapple,apple,pen'); +}); diff --git a/test/last/last.test.js b/test/last/last.test.js index fc0ba799c..48f7b4179 100644 --- a/test/last/last.test.js +++ b/test/last/last.test.js @@ -1,21 +1,33 @@ -const test = require('tape'); +const expect = require('expect'); const last = require('./last.js'); -test('Testing last', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof last === 'function', 'last is a Function'); - t.true(last({ a: 1234}) === undefined, 'last({ a: 1234}) returns undefined'); - t.equal(last([1, 2, 3]), 3, "last([1, 2, 3]) returns 3"); - t.equal(last({ 0: false}), undefined, 'last({ 0: false}) returns undefined'); - t.equal(last('String'), 'g', 'last(String) returns g'); - t.throws(() => last(null), 'last(null) throws an Error'); - t.throws(() => last(undefined), 'last(undefined) throws an Error'); - t.throws(() => last(), 'last() throws an Error'); - - let start = new Date().getTime(); - last([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]); - let end = new Date().getTime(); - t.true((end - start) < 2000, 'last([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run'); - t.end(); -}); \ No newline at end of file +test('last is a Function', () => { + expect(last).toBeInstanceOf(Function); +}); +test('last({ a: 1234}) returns undefined', () => { + expect(last({ a: 1234}) === undefined).toBeTruthy(); +}); +test('last([1, 2, 3]) returns 3', () => { + expect(last([1, 2, 3])).toBe(3); +}); +test('last({ 0: false}) returns undefined', () => { + expect(last({ 0: false})).toBe(undefined); +}); +test('last(String) returns g', () => { + expect(last('String')).toBe('g'); +}); +test('last(null) throws an Error', () => { + expect(() => { last(null); }).toThrow(); +}); +test('last(undefined) throws an Error', () => { + expect(() => { last(undefined); }).toThrow(); +}); +test('last() throws an Error', () => { + expect(() => { last(); }).toThrow(); +}); +let start = new Date().getTime(); +last([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]); +let end = new Date().getTime(); +test('last([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run', () => { + expect((end - start) < 2000).toBeTruthy(); +}); diff --git a/test/lcm/lcm.test.js b/test/lcm/lcm.test.js index cba81345c..dfa340b88 100644 --- a/test/lcm/lcm.test.js +++ b/test/lcm/lcm.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const lcm = require('./lcm.js'); -test('Testing lcm', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof lcm === 'function', 'lcm is a Function'); - t.equal(lcm(12, 7), 84, "Returns the least common multiple of two or more numbers."); - t.equal(lcm(...[1, 3, 4, 5]), 60, "Returns the least common multiple of two or more numbers."); - //t.deepEqual(lcm(args..), 'Expected'); - //t.equal(lcm(args..), 'Expected'); - //t.false(lcm(args..), 'Expected'); - //t.throws(lcm(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('lcm is a Function', () => { + expect(lcm).toBeInstanceOf(Function); +}); +test('Returns the least common multiple of two or more numbers.', () => { + expect(lcm(12, 7)).toBe(84); +}); +test('Returns the least common multiple of two or more numbers.', () => { + expect(lcm(...[1, 3, 4, 5])).toBe(60); +}); diff --git a/test/levenshteinDistance/levenshteinDistance.test.js b/test/levenshteinDistance/levenshteinDistance.test.js index 3c3c74404..c5556114d 100644 --- a/test/levenshteinDistance/levenshteinDistance.test.js +++ b/test/levenshteinDistance/levenshteinDistance.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const levenshteinDistance = require('./levenshteinDistance.js'); -test('Testing levenshteinDistance', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof levenshteinDistance === 'function', 'levenshteinDistance is a Function'); - //t.deepEqual(levenshteinDistance(args..), 'Expected'); - //t.equal(levenshteinDistance(args..), 'Expected'); - //t.false(levenshteinDistance(args..), 'Expected'); - //t.throws(levenshteinDistance(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('levenshteinDistance is a Function', () => { + expect(levenshteinDistance).toBeInstanceOf(Function); +}); diff --git a/test/longestItem/longestItem.test.js b/test/longestItem/longestItem.test.js index ae4b53739..7e8c01357 100644 --- a/test/longestItem/longestItem.test.js +++ b/test/longestItem/longestItem.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const longestItem = require('./longestItem.js'); -test('Testing longestItem', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof longestItem === 'function', 'longestItem is a Function'); - t.deepEqual(longestItem('this', 'is', 'a', 'testcase'), 'testcase', "Returns the longest object"); - //t.deepEqual(longestItem(args..), 'Expected'); - //t.equal(longestItem(args..), 'Expected'); - //t.false(longestItem(args..), 'Expected'); - //t.throws(longestItem(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('longestItem is a Function', () => { + expect(longestItem).toBeInstanceOf(Function); +}); +test('Returns the longest object', () => { + expect(longestItem('this', 'is', 'a', 'testcase')).toEqual('testcase'); +}); diff --git a/test/lowercaseKeys/lowercaseKeys.test.js b/test/lowercaseKeys/lowercaseKeys.test.js index 6b7937773..37868e338 100644 --- a/test/lowercaseKeys/lowercaseKeys.test.js +++ b/test/lowercaseKeys/lowercaseKeys.test.js @@ -1,17 +1,14 @@ -const test = require('tape'); +const expect = require('expect'); const lowercaseKeys = require('./lowercaseKeys.js'); -test('Testing lowercaseKeys', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof lowercaseKeys === 'function', 'lowercaseKeys is a Function'); - const myObj = { Name: 'Adam', sUrnAME: 'Smith' }; - const myObjLower = lowercaseKeys(myObj); - t.deepEqual(myObjLower, {name: 'Adam', surname: 'Smith'}, 'Lowercases object keys'); - t.deepEqual(myObj, { Name: 'Adam', sUrnAME: 'Smith' }, 'Does not mutate original object'); - //t.deepEqual(lowercaseKeys(args..), 'Expected'); - //t.equal(lowercaseKeys(args..), 'Expected'); - //t.false(lowercaseKeys(args..), 'Expected'); - //t.throws(lowercaseKeys(args..), 'Expected'); - t.end(); +test('lowercaseKeys is a Function', () => { + expect(lowercaseKeys).toBeInstanceOf(Function); +}); +const myObj = { Name: 'Adam', sUrnAME: 'Smith' }; +const myObjLower = lowercaseKeys(myObj); +test('Lowercases object keys', () => { + expect(myObjLower).toEqual( {name: 'Adam', surname: 'Smith'}); +}); +test('Does not mutate original object', () => { + expect(myObj).toEqual({ Name: 'Adam', sUrnAME: 'Smith' }); }); diff --git a/test/luhnCheck/luhnCheck.test.js b/test/luhnCheck/luhnCheck.test.js index e044cbd85..28d176fe5 100644 --- a/test/luhnCheck/luhnCheck.test.js +++ b/test/luhnCheck/luhnCheck.test.js @@ -1,16 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const luhnCheck = require('./luhnCheck.js'); -test('Testing luhnCheck', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof luhnCheck === 'function', 'luhnCheck is a Function'); - t.equal(luhnCheck(6011329933655299), false, "validates identification number"); - t.equal(luhnCheck('4485275742308327'), true, "validates identification number"); - t.equal(luhnCheck(123456789), false, "validates identification number"); - //t.deepEqual(luhnCheck(args..), 'Expected'); - //t.equal(luhnCheck(args..), 'Expected'); - //t.false(luhnCheck(args..), 'Expected'); - //t.throws(luhnCheck(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('luhnCheck is a Function', () => { + expect(luhnCheck).toBeInstanceOf(Function); +}); +test('validates identification number', () => { + expect(luhnCheck(6011329933655299)).toBeFalsy(); +}); +test('validates identification number', () => { + expect(luhnCheck('4485275742308327')).toBeTruthy(); +}); +test('validates identification number', () => { + expect(luhnCheck(123456789)).toBeFalsy(); +}); diff --git a/test/mapKeys/mapKeys.test.js b/test/mapKeys/mapKeys.test.js index 1ce44e71f..076f1fabe 100644 --- a/test/mapKeys/mapKeys.test.js +++ b/test/mapKeys/mapKeys.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const mapKeys = require('./mapKeys.js'); -test('Testing mapKeys', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof mapKeys === 'function', 'mapKeys is a Function'); - t.deepEqual(mapKeys({ a: 1, b: 2 }, (val, key) => key + val), { a1: 1, b2: 2 }, 'Maps keys'); - //t.deepEqual(mapKeys(args..), 'Expected'); - //t.equal(mapKeys(args..), 'Expected'); - //t.false(mapKeys(args..), 'Expected'); - //t.throws(mapKeys(args..), 'Expected'); - t.end(); +test('mapKeys is a Function', () => { + expect(mapKeys).toBeInstanceOf(Function); +}); +test('Maps keys', () => { + expect(mapKeys({ a: 1, b: 2 }, (val, key) => key + val)).toEqual({ a1: 1, b2: 2 }); }); diff --git a/test/mapObject/mapObject.test.js b/test/mapObject/mapObject.test.js index 294bdcd00..86d5cf698 100644 --- a/test/mapObject/mapObject.test.js +++ b/test/mapObject/mapObject.test.js @@ -1,16 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const mapObject = require('./mapObject.js'); -test('Testing mapObject', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof mapObject === 'function', 'mapObject is a Function'); - t.deepEqual(mapObject([1, 2, 3], a => a * a), { 1: 1, 2: 4, 3: 9 }, "mapObject([1, 2, 3], a => a * a) returns { 1: 1, 2: 4, 3: 9 }"); - t.deepEqual(mapObject([1, 2, 3, 4], (a, b) => b - a), { 1: -1, 2: -1, 3: -1, 4: -1 }, 'mapObject([1, 2, 3, 4], (a, b) => b - a) returns { 1: -1, 2: -1, 3: -1, 4: -1 }'); - t.deepEqual(mapObject([1, 2, 3, 4], (a, b) => a - b), { 1: 1, 2: 1, 3: 1, 4: 1 }, 'mapObject([1, 2, 3, 4], (a, b) => a - b) returns { 1: 1, 2: 1, 3: 1, 4: 1 }'); - - //t.equal(mapObject(args..), 'Expected'); - //t.false(mapObject(args..), 'Expected'); - //t.throws(mapObject(args..), 'Expected'); - t.end(); +test('mapObject is a Function', () => { + expect(mapObject).toBeInstanceOf(Function); +}); +test('mapObject([1, 2, 3], a => a * a) returns { 1: 1, 2: 4, 3: 9 }', () => { + expect(mapObject([1, 2, 3], a => a * a)).toEqual({ 1: 1, 2: 4, 3: 9 }); +}); +test('mapObject([1, 2, 3, 4], (a, b) => b - a) returns { 1: -1, 2: -1, 3: -1, 4: -1 }', () => { + expect(mapObject([1, 2, 3, 4], (a, b) => b - a)).toEqual({ 1: -1, 2: -1, 3: -1, 4: -1 }); +}); +test('mapObject([1, 2, 3, 4], (a, b) => a - b) returns { 1: 1, 2: 1, 3: 1, 4: 1 }', () => { + expect(mapObject([1, 2, 3, 4], (a, b) => a - b)).toEqual({ 1: 1, 2: 1, 3: 1, 4: 1 }); }); diff --git a/test/mapValues/mapValues.test.js b/test/mapValues/mapValues.test.js index 273ada753..24273703c 100644 --- a/test/mapValues/mapValues.test.js +++ b/test/mapValues/mapValues.test.js @@ -1,18 +1,13 @@ -const test = require('tape'); +const expect = require('expect'); const mapValues = require('./mapValues.js'); -test('Testing mapValues', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof mapValues === 'function', 'mapValues is a Function'); - const users = { - fred: { user: 'fred', age: 40 }, - pebbles: { user: 'pebbles', age: 1 } - }; - t.deepEqual(mapValues(users, u => u.age), { fred: 40, pebbles: 1 }, 'Maps values'); - //t.deepEqual(mapValues(args..), 'Expected'); - //t.equal(mapValues(args..), 'Expected'); - //t.false(mapValues(args..), 'Expected'); - //t.throws(mapValues(args..), 'Expected'); - t.end(); +test('mapValues is a Function', () => { + expect(mapValues).toBeInstanceOf(Function); +}); +const users = { + fred: { user: 'fred', age: 40 }, + pebbles: { user: 'pebbles', age: 1 } +}; +test('Maps values', () => { + expect(mapValues(users, u => u.age)).toEqual({ fred: 40, pebbles: 1 }); }); diff --git a/test/mask/mask.test.js b/test/mask/mask.test.js index dc57ed888..11c8e4cb5 100644 --- a/test/mask/mask.test.js +++ b/test/mask/mask.test.js @@ -1,16 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const mask = require('./mask.js'); -test('Testing mask', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof mask === 'function', 'mask is a Function'); - t.equal(mask(1234567890), '******7890', "Replaces all but the last num of characters with the specified mask character"); - t.equal(mask(1234567890, 3), '*******890', "Replaces all but the last num of characters with the specified mask character"); - t.equal(mask(1234567890, -4, '$'), '$$$$567890', "Replaces all but the last num of characters with the specified mask character"); - - //t.equal(mask(args..), 'Expected'); - //t.false(mask(args..), 'Expected'); - //t.throws(mask(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('mask is a Function', () => { + expect(mask).toBeInstanceOf(Function); +}); +test('Replaces all but the last num of characters with the specified mask character', () => { + expect(mask(1234567890)).toBe('******7890'); +}); +test('Replaces all but the last num of characters with the specified mask character', () => { + expect(mask(1234567890, 3)).toBe('*******890'); +}); +test('Replaces all but the last num of characters with the specified mask character', () => { + expect(mask(1234567890, -4, '$')).toBe('$$$$567890'); +}); diff --git a/test/matches/matches.test.js b/test/matches/matches.test.js index e28065fa5..221c9d950 100644 --- a/test/matches/matches.test.js +++ b/test/matches/matches.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const matches = require('./matches.js'); -test('Testing matches', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof matches === 'function', 'matches is a Function'); - t.true(matches({ age: 25, hair: 'long', beard: true }, { hair: 'long', beard: true }), 'Matches returns true for two similar objects'); - t.false(matches({ hair: 'long', beard: true }, { age: 25, hair: 'long', beard: true }), 'Matches returns false for two non-similar objects'); - //t.deepEqual(matches(args..), 'Expected'); - //t.equal(matches(args..), 'Expected'); - //t.false(matches(args..), 'Expected'); - //t.throws(matches(args..), 'Expected'); - t.end(); +test('matches is a Function', () => { + expect(matches).toBeInstanceOf(Function); +}); +test('Matches returns true for two similar objects', () => { + expect(matches({ age: 25, hair: 'long', beard: true }, { hair: 'long', beard: true })).toBeTruthy(); +}); +test('Matches returns false for two non-similar objects', () => { + expect(matches({ hair: 'long', beard: true }, { age: 25, hair: 'long', beard: true })).toBeFalsy(); }); diff --git a/test/matchesWith/matchesWith.test.js b/test/matchesWith/matchesWith.test.js index 9ce717785..5de34f836 100644 --- a/test/matchesWith/matchesWith.test.js +++ b/test/matchesWith/matchesWith.test.js @@ -1,19 +1,14 @@ -const test = require('tape'); +const expect = require('expect'); const matchesWith = require('./matchesWith.js'); -test('Testing matchesWith', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof matchesWith === 'function', 'matchesWith is a Function'); - const isGreeting = val => /^h(?:i|ello)$/.test(val); - t.true(matchesWith( +test('matchesWith is a Function', () => { + expect(matchesWith).toBeInstanceOf(Function); +}); +const isGreeting = val => /^h(?:i|ello)$/.test(val); +test('Returns true for two objects with similar values, based on the provided function', () => { + expect(matchesWith( { greeting: 'hello' }, { greeting: 'hi' }, (oV, sV) => isGreeting(oV) && isGreeting(sV) - ), 'Returns true for two objects with similar values, based on the provided function'); - //t.deepEqual(matchesWith(args..), 'Expected'); - //t.equal(matchesWith(args..), 'Expected'); - //t.false(matchesWith(args..), 'Expected'); - //t.throws(matchesWith(args..), 'Expected'); - t.end(); + )).toBeTruthy(); }); diff --git a/test/maxBy/maxBy.test.js b/test/maxBy/maxBy.test.js index 3c0d156b3..2cd581553 100644 --- a/test/maxBy/maxBy.test.js +++ b/test/maxBy/maxBy.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const maxBy = require('./maxBy.js'); -test('Testing maxBy', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof maxBy === 'function', 'maxBy is a Function'); - t.equals(maxBy([{ n: 4 }, { n: 2 }, { n: 8 }, { n: 6 }], o => o.n), 8, 'Produces the right result with a function'); - t.equals(maxBy([{ n: 4 }, { n: 2 }, { n: 8 }, { n: 6 }], 'n'), 8, 'Produces the right result with a property name'); - //t.deepEqual(maxBy(args..), 'Expected'); - //t.equal(maxBy(args..), 'Expected'); - //t.false(maxBy(args..), 'Expected'); - //t.throws(maxBy(args..), 'Expected'); - t.end(); +test('maxBy is a Function', () => { + expect(maxBy).toBeInstanceOf(Function); +}); +test('Produces the right result with a function', () => { + expect(maxBy([{ n: 4 }, { n: 2 }, { n: 8 }, { n: 6 }], o => o.n)).toBe(8); +}); +test('Produces the right result with a property name', () => { + expect(maxBy([{ n: 4 }, { n: 2 }, { n: 8 }, { n: 6 }], 'n')).toBe(8); }); diff --git a/test/maxN/maxN.test.js b/test/maxN/maxN.test.js index 89e14ab98..dc100b2f7 100644 --- a/test/maxN/maxN.test.js +++ b/test/maxN/maxN.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const maxN = require('./maxN.js'); -test('Testing maxN', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof maxN === 'function', 'maxN is a Function'); - t.deepEqual(maxN([1, 2, 3]), [3], "Returns the n maximum elements from the provided array"); - t.deepEqual(maxN([1, 2, 3], 2), [3, 2], "Returns the n maximum elements from the provided array"); - //t.deepEqual(maxN(args..), 'Expected'); - //t.equal(maxN(args..), 'Expected'); - //t.false(maxN(args..), 'Expected'); - //t.throws(maxN(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('maxN is a Function', () => { + expect(maxN).toBeInstanceOf(Function); +}); +test('Returns the n maximum elements from the provided array', () => { + expect(maxN([1, 2, 3])).toEqual([3]); +}); +test('Returns the n maximum elements from the provided array', () => { + expect(maxN([1, 2, 3], 2)).toEqual([3, 2]); +}); diff --git a/test/median/median.test.js b/test/median/median.test.js index 9fa44be9c..76835c0b8 100644 --- a/test/median/median.test.js +++ b/test/median/median.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const median = require('./median.js'); -test('Testing median', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof median === 'function', 'median is a Function'); - t.equal(median([5, 6, 50, 1, -5]), 5, "Returns the median of an array of numbers"); - t.equal(median([1, 2, 3]), 2, "Returns the median of an array of numbers"); - //t.deepEqual(median(args..), 'Expected'); - //t.equal(median(args..), 'Expected'); - //t.false(median(args..), 'Expected'); - //t.throws(median(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('median is a Function', () => { + expect(median).toBeInstanceOf(Function); +}); +test('Returns the median of an array of numbers', () => { + expect(median([5, 6, 50, 1, -5])).toBe(5); +}); +test('Returns the median of an array of numbers', () => { + expect(median([1, 2, 3])).toBe(2); +}); diff --git a/test/memoize/memoize.test.js b/test/memoize/memoize.test.js index e90eb2b05..ec8b0ca9e 100644 --- a/test/memoize/memoize.test.js +++ b/test/memoize/memoize.test.js @@ -1,18 +1,17 @@ -const test = require('tape'); +const expect = require('expect'); const memoize = require('./memoize.js'); -test('Testing memoize', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof memoize === 'function', 'memoize is a Function'); - const f = x => x * x; - const square = memoize(f); - t.equal(square(2), 4, 'Function works properly'); - t.equal(square(3), 9, 'Function works properly'); - t.deepEqual(Array.from(square.cache), [[2,4],[3,9]], 'Cache stores values'); - //t.deepEqual(memoize(args..), 'Expected'); - //t.equal(memoize(args..), 'Expected'); - //t.false(memoize(args..), 'Expected'); - //t.throws(memoize(args..), 'Expected'); - t.end(); +test('memoize is a Function', () => { + expect(memoize).toBeInstanceOf(Function); +}); +const f = x => x * x; +const square = memoize(f); +test('Function works properly', () => { + expect(square(2)).toBe(4); +}); +test('Function works properly', () => { + expect(square(3)).toBe(9); +}); +test('Cache stores values', () => { + expect(Array.from(square.cache)).toEqual([[2,4],[3,9]]); }); diff --git a/test/merge/merge.test.js b/test/merge/merge.test.js index 2ed73d89a..e46ac3b4b 100644 --- a/test/merge/merge.test.js +++ b/test/merge/merge.test.js @@ -1,23 +1,18 @@ -const test = require('tape'); +const expect = require('expect'); const merge = require('./merge.js'); -test('Testing merge', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof merge === 'function', 'merge is a Function'); - const object = { - a: [{ x: 2 }, { y: 4 }], - b: 1 - }; - const other = { - a: { z: 3 }, - b: [2, 3], - c: 'foo' - }; - t.deepEqual(merge(object, other), { a: [ { x: 2 }, { y: 4 }, { z: 3 } ], b: [ 1, 2, 3 ], c: 'foo' }, 'Merges two objects'); - //t.deepEqual(merge(args..), 'Expected'); - //t.equal(merge(args..), 'Expected'); - //t.false(merge(args..), 'Expected'); - //t.throws(merge(args..), 'Expected'); - t.end(); +test('merge is a Function', () => { + expect(merge).toBeInstanceOf(Function); +}); +const object = { + a: [{ x: 2 }, { y: 4 }], + b: 1 +}; +const other = { + a: { z: 3 }, + b: [2, 3], + c: 'foo' +}; +test('Merges two objects', () => { + expect(merge(object, other)).toEqual({ a: [ { x: 2 }, { y: 4 }, { z: 3 } ], b: [ 1, 2, 3 ], c: 'foo' }); }); diff --git a/test/minBy/minBy.test.js b/test/minBy/minBy.test.js index f2a0ca5ff..82a1beeed 100644 --- a/test/minBy/minBy.test.js +++ b/test/minBy/minBy.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const minBy = require('./minBy.js'); -test('Testing minBy', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof minBy === 'function', 'minBy is a Function'); - t.equals(minBy([{ n: 4 }, { n: 2 }, { n: 8 }, { n: 6 }], o => o.n), 2, 'Produces the right result with a function'); - t.equals(minBy([{ n: 4 }, { n: 2 }, { n: 8 }, { n: 6 }], 'n'), 2, 'Produces the right result with a property name'); - //t.deepEqual(minBy(args..), 'Expected'); - //t.equal(minBy(args..), 'Expected'); - //t.false(minBy(args..), 'Expected'); - //t.throws(minBy(args..), 'Expected'); - t.end(); +test('minBy is a Function', () => { + expect(minBy).toBeInstanceOf(Function); +}); +test('Produces the right result with a function', () => { + expect(minBy([{ n: 4 }, { n: 2 }, { n: 8 }, { n: 6 }], o => o.n)).toBe(2); +}); +test('Produces the right result with a property name', () => { + expect(minBy([{ n: 4 }, { n: 2 }, { n: 8 }, { n: 6 }], 'n')).toBe(2); }); diff --git a/test/minN/minN.test.js b/test/minN/minN.test.js index edfd36631..dd4269711 100644 --- a/test/minN/minN.test.js +++ b/test/minN/minN.test.js @@ -1,14 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const minN = require('./minN.js'); -test('Testing minN', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof minN === 'function', 'minN is a Function'); - t.deepEqual(minN([1, 2, 3]), [1], "Returns the n minimum elements from the provided array"); - t.deepEqual(minN([1, 2, 3], 2), [1, 2], "Returns the n minimum elements from the provided array"); - //t.equal(minN(args..), 'Expected'); - //t.false(minN(args..), 'Expected'); - //t.throws(minN(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('minN is a Function', () => { + expect(minN).toBeInstanceOf(Function); +}); +test('Returns the n minimum elements from the provided array', () => { + expect(minN([1, 2, 3])).toEqual([1]); +}); +test('Returns the n minimum elements from the provided array', () => { + expect(minN([1, 2, 3], 2), ).toEqual([1, 2]); +}); diff --git a/test/mostPerformant/mostPerformant.test.js b/test/mostPerformant/mostPerformant.test.js index 95a560f91..877fcdfa8 100644 --- a/test/mostPerformant/mostPerformant.test.js +++ b/test/mostPerformant/mostPerformant.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const mostPerformant = require('./mostPerformant.js'); -test('Testing mostPerformant', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof mostPerformant === 'function', 'mostPerformant is a Function'); - t.pass('Tested by @chalarangelo on 16/02/2018'); - //t.deepEqual(mostPerformant(args..), 'Expected'); - //t.equal(mostPerformant(args..), 'Expected'); - //t.false(mostPerformant(args..), 'Expected'); - //t.throws(mostPerformant(args..), 'Expected'); - t.end(); +test('mostPerformant is a Function', () => { + expect(mostPerformant).toBeInstanceOf(Function); }); diff --git a/test/negate/negate.test.js b/test/negate/negate.test.js index a356b8a2d..7dfd8b080 100644 --- a/test/negate/negate.test.js +++ b/test/negate/negate.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const negate = require('./negate.js'); -test('Testing negate', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof negate === 'function', 'negate is a Function'); - t.deepEqual([1, 2, 3, 4, 5, 6].filter(negate(n => n % 2 === 0)), [1, 3, 5], "Negates a predicate function"); - //t.deepEqual(negate(args..), 'Expected'); - //t.equal(negate(args..), 'Expected'); - //t.false(negate(args..), 'Expected'); - //t.throws(negate(args..), 'Expected'); - t.end(); +test('negate is a Function', () => { + expect(negate).toBeInstanceOf(Function); +}); +test('Negates a predicate function', () => { + expect([1, 2, 3, 4, 5, 6].filter(negate(n => n % 2 === 0))).toEqual([1, 3, 5]); }); diff --git a/test/nest/nest.test.js b/test/nest/nest.test.js index f3b177255..894a17001 100644 --- a/test/nest/nest.test.js +++ b/test/nest/nest.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const nest = require('./nest.js'); -test('Testing nest', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof nest === 'function', 'nest is a Function'); - //t.deepEqual(nest(args..), 'Expected'); - //t.equal(nest(args..), 'Expected'); - //t.false(nest(args..), 'Expected'); - //t.throws(nest(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('nest is a Function', () => { + expect(nest).toBeInstanceOf(Function); +}); diff --git a/test/nodeListToArray/nodeListToArray.test.js b/test/nodeListToArray/nodeListToArray.test.js index 12d99435c..3ebb00c14 100644 --- a/test/nodeListToArray/nodeListToArray.test.js +++ b/test/nodeListToArray/nodeListToArray.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const nodeListToArray = require('./nodeListToArray.js'); -test('Testing nodeListToArray', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof nodeListToArray === 'function', 'nodeListToArray is a Function'); - //t.deepEqual(nodeListToArray(args..), 'Expected'); - //t.equal(nodeListToArray(args..), 'Expected'); - //t.false(nodeListToArray(args..), 'Expected'); - //t.throws(nodeListToArray(args..), 'Expected'); - t.end(); +test('nodeListToArray is a Function', () => { + expect(nodeListToArray).toBeInstanceOf(Function); }); \ No newline at end of file diff --git a/test/none/none.test.js b/test/none/none.test.js index af6209d91..f46e207b0 100644 --- a/test/none/none.test.js +++ b/test/none/none.test.js @@ -1,17 +1,18 @@ -const test = require('tape'); +const expect = require('expect'); const none = require('./none.js'); -test('Testing none', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof none === 'function', 'none is a Function'); - t.true(none([0,undefined,NaN,null,'']), 'Returns true for arrays with no truthy values'); - t.false(none([0,1]), 'Returns false for arrays with at least one truthy value'); - t.true(none([4,1,0,3], x => x < 0), 'Returns true with a predicate function'); - t.false(none([0,1,2], x => x === 1), 'Returns false with predicate function'); - //t.deepEqual(none(args..), 'Expected'); - //t.equal(none(args..), 'Expected'); - //t.false(none(args..), 'Expected'); - //t.throws(none(args..), 'Expected'); - t.end(); +test('none is a Function', () => { + expect(none).toBeInstanceOf(Function); +}); +test('Returns true for arrays with no truthy values', () => { + expect(none([0,undefined,NaN,null,''])).toBeTruthy(); +}); +test('Returns false for arrays with at least one truthy value', () => { + expect(none([0,1])).toBeFalsy(); +}); +test('Returns true with a predicate function', () => { + expect(none([4,1,0,3], x => x < 0)).toBeTruthy(); +}); +test('Returns false with predicate function', () => { + expect(none([0,1,2], x => x === 1)).toBeFalsy(); }); diff --git a/test/nthArg/nthArg.test.js b/test/nthArg/nthArg.test.js index b8cc4b62c..621f91dac 100644 --- a/test/nthArg/nthArg.test.js +++ b/test/nthArg/nthArg.test.js @@ -1,18 +1,18 @@ -const test = require('tape'); +const expect = require('expect'); const nthArg = require('./nthArg.js'); -test('Testing nthArg', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof nthArg === 'function', 'nthArg is a Function'); - const third = nthArg(2); - t.equal(third(1, 2, 3), 3, 'Returns the nth argument'); - t.equal(third(1, 2), undefined, 'Returns undefined if arguments too few'); - const last = nthArg(-1); - t.equal(last(1, 2, 3, 4, 5), 5, 'Works for negative values'); - //t.deepEqual(nthArg(args..), 'Expected'); - //t.equal(nthArg(args..), 'Expected'); - //t.false(nthArg(args..), 'Expected'); - //t.throws(nthArg(args..), 'Expected'); - t.end(); +test('nthArg is a Function', () => { + expect(nthArg).toBeInstanceOf(Function); }); +const third = nthArg(2); +test('Returns the nth argument', () => { + expect(third(1, 2, 3)).toBe(3); +}); +test('Returns undefined if arguments too few', () => { + expect(third(1, 2)).toBe(undefined); +}); +const last = nthArg(-1); +test('Works for negative values', () => { + expect(last(1, 2, 3, 4, 5)).toBe(5); +}); + diff --git a/test/nthElement/nthElement.test.js b/test/nthElement/nthElement.test.js index 6db6ddd4a..774de6f78 100644 --- a/test/nthElement/nthElement.test.js +++ b/test/nthElement/nthElement.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const nthElement = require('./nthElement.js'); -test('Testing nthElement', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof nthElement === 'function', 'nthElement is a Function'); - t.equal(nthElement(['a', 'b', 'c'], 1), 'b', "Returns the nth element of an array."); - t.equal(nthElement(['a', 'b', 'c'], -3), 'a', "Returns the nth element of an array."); - //t.deepEqual(nthElement(args..), 'Expected'); - //t.equal(nthElement(args..), 'Expected'); - //t.false(nthElement(args..), 'Expected'); - //t.throws(nthElement(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('nthElement is a Function', () => { + expect(nthElement).toBeInstanceOf(Function); +}); +test('Returns the nth element of an array.', () => { + expect(nthElement(['a', 'b', 'c'], 1)).toBe('b'); +}); +test('Returns the nth element of an array.', () => { + expect(nthElement(['a', 'b', 'c'], -3)).toBe('a'); +}); diff --git a/test/objectFromPairs/objectFromPairs.test.js b/test/objectFromPairs/objectFromPairs.test.js index af270b7cf..d1d4db8f8 100644 --- a/test/objectFromPairs/objectFromPairs.test.js +++ b/test/objectFromPairs/objectFromPairs.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const objectFromPairs = require('./objectFromPairs.js'); -test('Testing objectFromPairs', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof objectFromPairs === 'function', 'objectFromPairs is a Function'); - t.deepEqual(objectFromPairs([['a', 1], ['b', 2]]), {a: 1, b: 2}, "Creates an object from the given key-value pairs."); - //t.deepEqual(objectFromPairs(args..), 'Expected'); - //t.equal(objectFromPairs(args..), 'Expected'); - //t.false(objectFromPairs(args..), 'Expected'); - //t.throws(objectFromPairs(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('objectFromPairs is a Function', () => { + expect(objectFromPairs).toBeInstanceOf(Function); +}); + test('Creates an object from the given key-value pairs.', () => { + expect(objectFromPairs([['a', 1], ['b', 2]])).toEqual({a: 1, b: 2}); +}); diff --git a/test/objectToPairs/objectToPairs.test.js b/test/objectToPairs/objectToPairs.test.js index e3477d39b..5db49742a 100644 --- a/test/objectToPairs/objectToPairs.test.js +++ b/test/objectToPairs/objectToPairs.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const objectToPairs = require('./objectToPairs.js'); -test('Testing objectToPairs', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof objectToPairs === 'function', 'objectToPairs is a Function'); - t.deepEqual(objectToPairs({ a: 1, b: 2 }), [['a',1],['b',2]], "Creates an array of key-value pair arrays from an object."); - //t.deepEqual(objectToPairs(args..), 'Expected'); - //t.equal(objectToPairs(args..), 'Expected'); - //t.false(objectToPairs(args..), 'Expected'); - //t.throws(objectToPairs(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('objectToPairs is a Function', () => { + expect(objectToPairs).toBeInstanceOf(Function); +}); +test('Creates an array of key-value pair arrays from an object.', () => { + expect(objectToPairs({ a: 1, b: 2 })).toEqual([['a',1],['b', 2]]); +}); diff --git a/test/observeMutations/observeMutations.test.js b/test/observeMutations/observeMutations.test.js index fe42861a2..314cdf633 100644 --- a/test/observeMutations/observeMutations.test.js +++ b/test/observeMutations/observeMutations.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const observeMutations = require('./observeMutations.js'); -test('Testing observeMutations', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof observeMutations === 'function', 'observeMutations is a Function'); - t.pass('Tested on 09/02/2018 by @chalarangelo'); - //t.deepEqual(observeMutations(args..), 'Expected'); - //t.equal(observeMutations(args..), 'Expected'); - //t.false(observeMutations(args..), 'Expected'); - //t.throws(observeMutations(args..), 'Expected'); - t.end(); +test('observeMutations is a Function', () => { + expect(observeMutations).toBeInstanceOf(Function); }); diff --git a/test/off/off.test.js b/test/off/off.test.js index 8a3eca663..59b87132d 100644 --- a/test/off/off.test.js +++ b/test/off/off.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const off = require('./off.js'); -test('Testing off', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof off === 'function', 'off is a Function'); - t.pass('Tested by @chalarangelo on 16/02/2018'); - //t.deepEqual(off(args..), 'Expected'); - //t.equal(off(args..), 'Expected'); - //t.false(off(args..), 'Expected'); - //t.throws(off(args..), 'Expected'); - t.end(); +test('off is a Function', () => { + expect(off).toBeInstanceOf(Function); }); diff --git a/test/offset/offset.test.js b/test/offset/offset.test.js index b122f8dbb..73ee2fe04 100644 --- a/test/offset/offset.test.js +++ b/test/offset/offset.test.js @@ -1,19 +1,24 @@ -const test = require('tape'); +const expect = require('expect'); const offset = require('./offset.js'); -test('Testing offset', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof offset === 'function', 'offset is a Function'); - t.deepEqual(offset([1, 2, 3, 4, 5], 0), [1, 2, 3, 4, 5], 'Offset of 0 returns the same array.'); - t.deepEqual(offset([1, 2, 3, 4, 5], 2), [3, 4, 5, 1, 2], 'Offset > 0 returns the offsetted array.'); - t.deepEqual(offset([1, 2, 3, 4, 5], -2), [4, 5, 1, 2, 3], 'Offset < 0 returns the reverse offsetted array.'); - t.deepEqual(offset([1, 2, 3, 4, 5], 6),[1, 2, 3, 4, 5], 'Offset greater than the length of the array returns the same array.'); - t.deepEqual(offset([1, 2, 3, 4, 5], -6), [1, 2, 3, 4, 5], 'Offset less than the negative length of the array returns the same array.'); - t.deepEqual(offset([], 3), [], 'Offsetting empty array returns an empty array.'); - //t.deepEqual(offset(args..), 'Expected'); - //t.equal(offset(args..), 'Expected'); - //t.false(offset(args..), 'Expected'); - //t.throws(offset(args..), 'Expected'); - t.end(); +test('offset is a Function', () => { + expect(offset).toBeInstanceOf(Function); +}); +test('Offset of 0 returns the same array.', () => { + expect(offset([1, 2, 3, 4, 5], 0)).toEqual([1, 2, 3, 4, 5]); +}); +test('Offset > 0 returns the offsetted array.', () => { + expect(offset([1, 2, 3, 4, 5], 2)).toEqual([3, 4, 5, 1, 2]); +}); +test('Offset < 0 returns the reverse offsetted array.', () => { + expect(offset([1, 2, 3, 4, 5], -2)).toEqual([4, 5, 1, 2, 3]); +}); +test('Offset greater than the length of the array returns the same array.', () => { + expect(offset([1, 2, 3, 4, 5], 6)).toEqual([1, 2, 3, 4, 5]); +}); +test('Offset less than the negative length of the array returns the same array.', () => { + expect(offset([1, 2, 3, 4, 5], -6)).toEqual([1, 2, 3, 4, 5]); +}); +test('Offsetting empty array returns an empty array.', () => { + expect(offset([], 3)).toEqual([]); }); diff --git a/test/omit/omit.test.js b/test/omit/omit.test.js index 296505687..50339eef4 100644 --- a/test/omit/omit.test.js +++ b/test/omit/omit.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const omit = require('./omit.js'); -test('Testing omit', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof omit === 'function', 'omit is a Function'); - t.deepEqual(omit({ a: 1, b: '2', c: 3 }, ['b']), { 'a': 1, 'c': 3 }, 'Omits the key-value pairs corresponding to the given keys from an object'); - //t.deepEqual(omit(args..), 'Expected'); - //t.equal(omit(args..), 'Expected'); - //t.false(omit(args..), 'Expected'); - //t.throws(omit(args..), 'Expected'); - t.end(); +test('omit is a Function', () => { + expect(omit).toBeInstanceOf(Function); +}); +test('Omits the key-value pairs corresponding to the given keys from an object', () => { + expect(omit({ a: 1, b: '2', c: 3 }, ['b'])).toEqual({ 'a': 1, 'c': 3 }); }); diff --git a/test/omitBy/omitBy.test.js b/test/omitBy/omitBy.test.js index cf01f902b..b380731b6 100644 --- a/test/omitBy/omitBy.test.js +++ b/test/omitBy/omitBy.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const omitBy = require('./omitBy.js'); -test('Testing omitBy', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof omitBy === 'function', 'omitBy is a Function'); - t.deepEqual(omitBy({ a: 1, b: '2', c: 3 }, x => typeof x === 'number'), { b: '2' }, 'Creates an object composed of the properties the given function returns falsey for'); - //t.deepEqual(omitBy(args..), 'Expected'); - //t.equal(omitBy(args..), 'Expected'); - //t.false(omitBy(args..), 'Expected'); - //t.throws(omitBy(args..), 'Expected'); - t.end(); +test('omitBy is a Function', () => { + expect(omitBy).toBeInstanceOf(Function); +}); +test('Creates an object composed of the properties the given function returns falsey for', () => { + expect(omitBy({ a: 1, b: '2', c: 3 }, x => typeof x === 'number')).toEqual( { b: '2' }); }); diff --git a/test/on/on.test.js b/test/on/on.test.js index f14e85ad0..8c1912742 100644 --- a/test/on/on.test.js +++ b/test/on/on.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const on = require('./on.js'); -test('Testing on', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof on === 'function', 'on is a Function'); - t.pass('Tested by @chalarangelo on 16/02/2018'); - //t.deepEqual(on(args..), 'Expected'); - //t.equal(on(args..), 'Expected'); - //t.false(on(args..), 'Expected'); - //t.throws(on(args..), 'Expected'); - t.end(); +test('on is a Function', () => { + expect(on).toBeInstanceOf(Function); }); diff --git a/test/onUserInputChange/onUserInputChange.test.js b/test/onUserInputChange/onUserInputChange.test.js index bbc726d63..675143979 100644 --- a/test/onUserInputChange/onUserInputChange.test.js +++ b/test/onUserInputChange/onUserInputChange.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const onUserInputChange = require('./onUserInputChange.js'); -test('Testing onUserInputChange', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof onUserInputChange === 'function', 'onUserInputChange is a Function'); - t.pass('Tested by @chalarangelo on 16/02/2018'); - //t.deepEqual(onUserInputChange(args..), 'Expected'); - //t.equal(onUserInputChange(args..), 'Expected'); - //t.false(onUserInputChange(args..), 'Expected'); - //t.throws(onUserInputChange(args..), 'Expected'); - t.end(); +test('onUserInputChange is a Function', () => { + expect(onUserInputChange).toBeInstanceOf(Function); }); diff --git a/test/once/once.test.js b/test/once/once.test.js index 89aba3872..ecd7ed6f0 100644 --- a/test/once/once.test.js +++ b/test/once/once.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const once = require('./once.js'); -test('Testing once', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof once === 'function', 'once is a Function'); - t.pass('Tested by @chalarangelo on 16/02/2018'); - //t.deepEqual(once(args..), 'Expected'); - //t.equal(once(args..), 'Expected'); - //t.false(once(args..), 'Expected'); - //t.throws(once(args..), 'Expected'); - t.end(); +test('once is a Function', () => { + expect(once).toBeInstanceOf(Function); }); diff --git a/test/orderBy/orderBy.test.js b/test/orderBy/orderBy.test.js index 2a721f61e..48d838468 100644 --- a/test/orderBy/orderBy.test.js +++ b/test/orderBy/orderBy.test.js @@ -1,16 +1,13 @@ -const test = require('tape'); +const expect = require('expect'); const orderBy = require('./orderBy.js'); -test('Testing orderBy', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof orderBy === 'function', 'orderBy is a Function'); - const users = [{ name: 'fred', age: 48 }, { name: 'barney', age: 36 }, { name: 'fred', age: 40 }]; - t.deepEqual(orderBy(users, ['name', 'age'], ['asc', 'desc']), [{name: 'barney', age: 36}, {name: 'fred', age: 48}, {name: 'fred', age: 40}], "Returns a sorted array of objects ordered by properties and orders."); - t.deepEqual(orderBy(users, ['name', 'age']), [{name: 'barney', age: 36}, {name: 'fred', age: 40}, {name: 'fred', age: 48}], "Returns a sorted array of objects ordered by properties and orders."); - //t.deepEqual(orderBy(args..), 'Expected'); - //t.equal(orderBy(args..), 'Expected'); - //t.false(orderBy(args..), 'Expected'); - //t.throws(orderBy(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('orderBy is a Function', () => { + expect(orderBy).toBeInstanceOf(Function); +}); +const users = [{ name: 'fred', age: 48 }, { name: 'barney', age: 36 }, { name: 'fred', age: 40 }]; +test('Returns a sorted array of objects ordered by properties and orders.', () => { + expect(orderBy(users, ['name', 'age'], ['asc', 'desc'])).toEqual([{name: 'barney', age: 36}, {name: 'fred', age: 48}, {name: 'fred', age: 40}]); +}); +test('Returns a sorted array of objects ordered by properties and orders.', () => { + expect(orderBy(users, ['name', 'age'])).toEqual( [{name: 'barney', age: 36}, {name: 'fred', age: 40}, {name: 'fred', age: 48}]); +}); diff --git a/test/over/over.test.js b/test/over/over.test.js index c349f6049..1ca8f5885 100644 --- a/test/over/over.test.js +++ b/test/over/over.test.js @@ -1,15 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const over = require('./over.js'); -test('Testing over', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof over === 'function', 'over is a Function'); - const minMax = over(Math.min, Math.max); - t.deepEqual(minMax(1, 2, 3, 4, 5), [1,5], 'Applies given functions over multiple arguments'); - //t.deepEqual(over(args..), 'Expected'); - //t.equal(over(args..), 'Expected'); - //t.false(over(args..), 'Expected'); - //t.throws(over(args..), 'Expected'); - t.end(); +test('over is a Function', () => { + expect(over).toBeInstanceOf(Function); +}); +const minMax = over(Math.min, Math.max); +test('Applies given functions over multiple arguments', () => { + expect(minMax(1, 2, 3, 4, 5)).toEqual([1,5]); }); diff --git a/test/overArgs/overArgs.test.js b/test/overArgs/overArgs.test.js index 523cf3ff2..2025c109c 100644 --- a/test/overArgs/overArgs.test.js +++ b/test/overArgs/overArgs.test.js @@ -1,17 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const overArgs = require('./overArgs.js'); -test('Testing overArgs', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof overArgs === 'function', 'overArgs is a Function'); - const square = n => n * n; - const double = n => n * 2; - const fn = overArgs((x, y) => [x, y], [square, double]); - t.deepEqual(fn(9, 3), [81, 6], 'Invokes the provided function with its arguments transformed'); - //t.deepEqual(overArgs(args..), 'Expected'); - //t.equal(overArgs(args..), 'Expected'); - //t.false(overArgs(args..), 'Expected'); - //t.throws(overArgs(args..), 'Expected'); - t.end(); +test('overArgs is a Function', () => { + expect(overArgs).toBeInstanceOf(Function); +}); +const square = n => n * n; +const double = n => n * 2; +const fn = overArgs((x, y) => [x, y], [square, double]); +test('Invokes the provided function with its arguments transformed', () => { + expect(fn(9, 3)).toEqual([81, 6]); }); diff --git a/test/pad/pad.test.js b/test/pad/pad.test.js index 035ebf91b..a90623980 100644 --- a/test/pad/pad.test.js +++ b/test/pad/pad.test.js @@ -1,13 +1,18 @@ -const test = require('tape'); +const expect = require('expect'); const pad = require('./pad.js'); -test('Testing pad', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof pad === 'function', 'pad is a Function'); - t.equal(pad('cat',8), ' cat ', 'cat is padded on both sides'); - t.equal(pad('cat',8).length, 8, 'length of string is 8'); - t.equal(pad(String(42), 6, '0'), '004200', 'pads 42 with "0"'); - t.equal(pad('foobar', 3), 'foobar', 'does not truncates if string exceeds length'); - t.end(); +test('pad is a Function', () => { + expect(pad).toBeInstanceOf(Function); +}); +test('cat is padded on both sides', () => { + expect(pad('cat',8)).toBe(' cat '); +}); + test('length of string is 8', () => { + expect(pad('cat',8).length).toBe(8); +}); + test('pads 42 with "0"', () => { + expect(pad(String(42), 6, '0')).toBe('004200'); +}); + test('does not truncates if string exceeds length', () => { + expect(pad('foobar', 3)).toBe('foobar'); }); diff --git a/test/palindrome/palindrome.test.js b/test/palindrome/palindrome.test.js index 2c65f5995..ae174bbec 100644 --- a/test/palindrome/palindrome.test.js +++ b/test/palindrome/palindrome.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const palindrome = require('./palindrome.js'); -test('Testing palindrome', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof palindrome === 'function', 'palindrome is a Function'); - t.equal(palindrome('taco cat'), true, "Given string is a palindrome"); - t.equal(palindrome('foobar'), false, "Given string is not a palindrome"); - //t.deepEqual(palindrome(args..), 'Expected'); - //t.equal(palindrome(args..), 'Expected'); - //t.false(palindrome(args..), 'Expected'); - //t.throws(palindrome(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('palindrome is a Function', () => { + expect(palindrome).toBeInstanceOf(Function); +}); +test('Given string is a palindrome', () => { + expect(palindrome('taco cat')).toBeTruthy(); +}); +test('Given string is not a palindrome', () => { + expect(palindrome('foobar')).toBeFalsy(); +}); diff --git a/test/parseCookie/parseCookie.test.js b/test/parseCookie/parseCookie.test.js index 2c6712d21..42e942538 100644 --- a/test/parseCookie/parseCookie.test.js +++ b/test/parseCookie/parseCookie.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const parseCookie = require('./parseCookie.js'); -test('Testing parseCookie', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof parseCookie === 'function', 'parseCookie is a Function'); - t.deepEqual(parseCookie('foo=bar; equation=E%3Dmc%5E2'), { foo: 'bar', equation: 'E=mc^2' }, 'Parses the cookie'); - //t.deepEqual(parseCookie(args..), 'Expected'); - //t.equal(parseCookie(args..), 'Expected'); - //t.false(parseCookie(args..), 'Expected'); - //t.throws(parseCookie(args..), 'Expected'); - t.end(); +test('parseCookie is a Function', () => { + expect(parseCookie).toBeInstanceOf(Function); +}); +test('Parses the cookie', () => { + expect(parseCookie('foo=bar; equation=E%3Dmc%5E2')).toEqual({ foo: 'bar', equation: 'E=mc^2' }); }); diff --git a/test/partial/partial.test.js b/test/partial/partial.test.js index 4c7b32d1d..5b3fd8f2b 100644 --- a/test/partial/partial.test.js +++ b/test/partial/partial.test.js @@ -1,18 +1,13 @@ -const test = require('tape'); +const expect = require('expect'); const partial = require('./partial.js'); -test('Testing partial', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof partial === 'function', 'partial is a Function'); - function greet(greeting, name) { - return greeting + ' ' + name + '!'; - } - const greetHello = partial(greet, 'Hello'); - t.equal(greetHello('John'), 'Hello John!', 'Prepends arguments'); - //t.deepEqual(partial(args..), 'Expected'); - //t.equal(partial(args..), 'Expected'); - //t.false(partial(args..), 'Expected'); - //t.throws(partial(args..), 'Expected'); - t.end(); +test('partial is a Function', () => { + expect(partial).toBeInstanceOf(Function); +}); +function greet(greeting, name) { + return greeting + ' ' + name + '!'; +} +const greetHello = partial(greet, 'Hello'); +test('Prepends arguments', () => { + expect(greetHello('John')).toBe('Hello John!'); }); diff --git a/test/partialRight/partialRight.test.js b/test/partialRight/partialRight.test.js index 75b3113b5..7e04a83ba 100644 --- a/test/partialRight/partialRight.test.js +++ b/test/partialRight/partialRight.test.js @@ -1,18 +1,13 @@ -const test = require('tape'); +const expect = require('expect'); const partialRight = require('./partialRight.js'); -test('Testing partialRight', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof partialRight === 'function', 'partialRight is a Function'); - function greet(greeting, name) { - return greeting + ' ' + name + '!'; - } - const greetJohn = partialRight(greet, 'John'); - t.equal(greetJohn('Hello'), 'Hello John!', 'Appends arguments'); - //t.deepEqual(partialRight(args..), 'Expected'); - //t.equal(partialRight(args..), 'Expected'); - //t.false(partialRight(args..), 'Expected'); - //t.throws(partialRight(args..), 'Expected'); - t.end(); +test('partialRight is a Function', () => { + expect(partialRight).toBeInstanceOf(Function); +}); +function greet(greeting, name) { + return greeting + ' ' + name + '!'; +} +const greetJohn = partialRight(greet, 'John'); +test('Appends arguments', () => { + expect(greetJohn('Hello')).toBe('Hello John!'); }); diff --git a/test/partition/partition.test.js b/test/partition/partition.test.js index 429fae050..b90671943 100644 --- a/test/partition/partition.test.js +++ b/test/partition/partition.test.js @@ -1,15 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const partition = require('./partition.js'); -test('Testing partition', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof partition === 'function', 'partition is a Function'); - const users = [{ user: 'barney', age: 36, active: false }, { user: 'fred', age: 40, active: true }]; - t.deepEqual(partition(users, o => o.active), [[{ 'user': 'fred', 'age': 40, 'active': true }],[{ 'user': 'barney', 'age': 36, 'active': false }]], "Groups the elements into two arrays, depending on the provided function's truthiness for each element."); - //t.deepEqual(partition(args..), 'Expected'); - //t.equal(partition(args..), 'Expected'); - //t.false(partition(args..), 'Expected'); - //t.throws(partition(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('partition is a Function', () => { + expect(partition).toBeInstanceOf(Function); +}); +const users = [{ user: 'barney', age: 36, active: false }, { user: 'fred', age: 40, active: true }]; +test('Groups the elements into two arrays, depending on the provided function\'s truthiness for each element.', () => { + expect(partition(users, o => o.active)).toEqual([[{ 'user': 'fred', 'age': 40, 'active': true }],[{ 'user': 'barney', 'age': 36, 'active': false }]]); +}); diff --git a/test/percentile/percentile.test.js b/test/percentile/percentile.test.js index 63cf07868..689c1be26 100644 --- a/test/percentile/percentile.test.js +++ b/test/percentile/percentile.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const percentile = require('./percentile.js'); -test('Testing percentile', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof percentile === 'function', 'percentile is a Function'); - t.equal(percentile([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 6), 55, "Uses the percentile formula to calculate how many numbers in the given array are less or equal to the given value."); - //t.deepEqual(percentile(args..), 'Expected'); - //t.equal(percentile(args..), 'Expected'); - //t.false(percentile(args..), 'Expected'); - //t.throws(percentile(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('percentile is a Function', () => { + expect(percentile).toBeInstanceOf(Function); +}); +test('Uses the percentile formula to calculate how many numbers in the given array are less or equal to the given value.', () => { + expect(percentile([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 6)).toBe(55); +}); diff --git a/test/permutations/permutations.test.js b/test/permutations/permutations.test.js index fe9b08e46..3dee8589c 100644 --- a/test/permutations/permutations.test.js +++ b/test/permutations/permutations.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const permutations = require('./permutations.js'); -test('Testing permutations', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof permutations === 'function', 'permutations is a Function'); - t.deepEqual(permutations([1, 33, 5]), [ [ 1, 33, 5 ], [ 1, 5, 33 ], [ 33, 1, 5 ], [ 33, 5, 1 ], [ 5, 1, 33 ], [ 5, 33, 1 ] ], 'Generates all permutations of an array'); - //t.deepEqual(permuteAll(args..), 'Expected'); - //t.equal(permuteAll(args..), 'Expected'); - //t.false(permuteAll(args..), 'Expected'); - //t.throws(permuteAll(args..), 'Expected'); - t.end(); +test('permutations is a Function', () => { + expect(permutations).toBeInstanceOf(Function); +}); +test('Generates all permutations of an array', () => { + expect(permutations([1, 33, 5])).toEqual([ [ 1, 33, 5 ], [ 1, 5, 33 ], [ 33, 1, 5 ], [ 33, 5, 1 ], [ 5, 1, 33 ], [ 5, 33, 1 ] ]); }); diff --git a/test/pick/pick.test.js b/test/pick/pick.test.js index 61565a0a2..95281c19a 100644 --- a/test/pick/pick.test.js +++ b/test/pick/pick.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const pick = require('./pick.js'); -test('Testing pick', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof pick === 'function', 'pick is a Function'); - t.deepEqual(pick({ a: 1, b: '2', c: 3 }, ['a', 'c']), { 'a': 1, 'c': 3 }, "Picks the key-value pairs corresponding to the given keys from an object."); - //t.deepEqual(pick(args..), 'Expected'); - //t.equal(pick(args..), 'Expected'); - //t.false(pick(args..), 'Expected'); - //t.throws(pick(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('pick is a Function', () => { + expect(pick).toBeInstanceOf(Function); +}); +test('Picks the key-value pairs corresponding to the given keys from an object.', () => { + expect(pick({ a: 1, b: '2', c: 3 }, ['a', 'c'])).toEqual({ 'a': 1, 'c': 3 }); +}); diff --git a/test/pickBy/pickBy.test.js b/test/pickBy/pickBy.test.js index 523ed0bdd..1d302187c 100644 --- a/test/pickBy/pickBy.test.js +++ b/test/pickBy/pickBy.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const pickBy = require('./pickBy.js'); -test('Testing pickBy', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof pickBy === 'function', 'pickBy is a Function'); - t.deepEqual(pickBy({ a: 1, b: '2', c: 3 }, x => typeof x === 'number'), { 'a': 1, 'c': 3 }, 'Creates an object composed of the properties the given function returns truthy for.'); - //t.deepEqual(pickBy(args..), 'Expected'); - //t.equal(pickBy(args..), 'Expected'); - //t.false(pickBy(args..), 'Expected'); - //t.throws(pickBy(args..), 'Expected'); - t.end(); +test('pickBy is a Function', () => { + expect(pickBy).toBeInstanceOf(Function); +}); +test('Creates an object composed of the properties the given function returns truthy for.', () => { + expect(pickBy({ a: 1, b: '2', c: 3 }, x => typeof x === 'number')).toEqual({ 'a': 1, 'c': 3 }); }); diff --git a/test/pipeAsyncFunctions/pipeAsyncFunctions.test.js b/test/pipeAsyncFunctions/pipeAsyncFunctions.test.js index 7a4ae346e..53ec89173 100644 --- a/test/pipeAsyncFunctions/pipeAsyncFunctions.test.js +++ b/test/pipeAsyncFunctions/pipeAsyncFunctions.test.js @@ -1,24 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const pipeAsyncFunctions = require('./pipeAsyncFunctions.js'); -test('Testing pipeAsyncFunctions', async (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof pipeAsyncFunctions === 'function', 'pipeAsyncFunctions is a Function'); - //t.deepEqual(pipeAsyncFunctions(args..), 'Expected'); - //t.equal(pipeAsyncFunctions(args..), 'Expected'); - //t.false(pipeAsyncFunctions(args..), 'Expected'); - //t.throws(pipeAsyncFunctions(args..), 'Expected'); - t.equal( - await pipeAsyncFunctions( - (x) => x + 1, - (x) => new Promise((resolve) => setTimeout(() => resolve(x + 2), 0)), - (x) => x + 3, - async (x) => await x + 4, - ) - (5), - 15, - 'pipeAsyncFunctions result should be 15' - ); - t.end(); -}); \ No newline at end of file +test('pipeAsyncFunctions is a Function', () => { + expect(pipeAsyncFunctions).toBeInstanceOf(Function); +}); +test('pipeAsyncFunctions result should be 15', () => { + expect(pipeAsyncFunctions( + (x) => x + 1, + (x) => new Promise((resolve) => setTimeout(() => resolve(x + 2), 0)), + (x) => x + 3, + async (x) => await x + 4, + ) + (5)).resolves.toBe(15); +}); diff --git a/test/pipeFunctions/pipeFunctions.test.js b/test/pipeFunctions/pipeFunctions.test.js index a9703858f..b121c9612 100644 --- a/test/pipeFunctions/pipeFunctions.test.js +++ b/test/pipeFunctions/pipeFunctions.test.js @@ -1,17 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const pipeFunctions = require('./pipeFunctions.js'); -test('Testing pipeFunctions', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof pipeFunctions === 'function', 'pipeFunctions is a Function'); - const add5 = x => x + 5; - const multiply = (x, y) => x * y; - const multiplyAndAdd5 = pipeFunctions(multiply, add5); - t.equal(multiplyAndAdd5(5, 2), 15, 'Performs left-to-right function composition'); - //t.deepEqual(pipeFunctions(args..), 'Expected'); - //t.equal(pipeFunctions(args..), 'Expected'); - //t.false(pipeFunctions(args..), 'Expected'); - //t.throws(pipeFunctions(args..), 'Expected'); - t.end(); +test('pipeFunctions is a Function', () => { + expect(pipeFunctions).toBeInstanceOf(Function); +}); +const add5 = x => x + 5; +const multiply = (x, y) => x * y; +const multiplyAndAdd5 = pipeFunctions(multiply, add5); +test('Performs left-to-right function composition', () => { + expect(multiplyAndAdd5(5, 2)).toBe(15); }); diff --git a/test/pluralize/pluralize.test.js b/test/pluralize/pluralize.test.js index 674244ca7..2a61e63b9 100644 --- a/test/pluralize/pluralize.test.js +++ b/test/pluralize/pluralize.test.js @@ -1,23 +1,26 @@ -const test = require('tape'); +const expect = require('expect'); const pluralize = require('./pluralize.js'); -test('Testing pluralize', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof pluralize === 'function', 'pluralize is a Function'); - t.equal(pluralize(0, 'apple'), 'apples', 'Produces the plural of the word'); - t.equal(pluralize(1, 'apple'), 'apple', 'Produces the singular of the word'); - t.equal(pluralize(2, 'apple'), 'apples', 'Produces the plural of the word'); - t.equal(pluralize(2, 'person', 'people'), 'people', 'Prodices the defined plural of the word'); - const PLURALS = { - person: 'people', - radius: 'radii' - }; - const autoPluralize = pluralize(PLURALS); - t.equal(autoPluralize(2, 'person'), 'people', 'Works with a dictionary'); - //t.deepEqual(pluralize(args..), 'Expected'); - //t.equal(pluralize(args..), 'Expected'); - //t.false(pluralize(args..), 'Expected'); - //t.throws(pluralize(args..), 'Expected'); - t.end(); +test('pluralize is a Function', () => { + expect(pluralize).toBeInstanceOf(Function); +}); +test('Produces the plural of the word', () => { + expect(pluralize(0, 'apple')).toBe('apples'); +}); +test('Produces the singular of the word', () => { + expect(pluralize(1, 'apple')).toBe('apple'); +}); +test('Produces the plural of the word', () => { + expect(pluralize(2, 'apple')).toBe('apples'); +}); +test('Prodices the defined plural of the word', () => { + expect(pluralize(2, 'person', 'people')).toBe('people'); +}); +const PLURALS = { + person: 'people', + radius: 'radii' +}; +const autoPluralize = pluralize(PLURALS); +test('Works with a dictionary', () => { + expect(autoPluralize(2, 'person')).toBe('people'); }); diff --git a/test/powerset/powerset.test.js b/test/powerset/powerset.test.js index a9bf7ba6a..50fd91f89 100644 --- a/test/powerset/powerset.test.js +++ b/test/powerset/powerset.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const powerset = require('./powerset.js'); -test('Testing powerset', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof powerset === 'function', 'powerset is a Function'); - t.deepEqual(powerset([1, 2]), [[], [1], [2], [2,1]], "Returns the powerset of a given array of numbers."); - //t.deepEqual(powerset(args..), 'Expected'); - //t.equal(powerset(args..), 'Expected'); - //t.false(powerset(args..), 'Expected'); - //t.throws(powerset(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('powerset is a Function', () => { + expect(powerset).toBeInstanceOf(Function); +}); +test('Returns the powerset of a given array of numbers.', () => { + expect(powerset([1, 2])).toEqual([[], [1], [2], [2, 1]]); +}); diff --git a/test/prefix/prefix.test.js b/test/prefix/prefix.test.js index 846d951c1..4f6e86f19 100644 --- a/test/prefix/prefix.test.js +++ b/test/prefix/prefix.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const prefix = require('./prefix.js'); -test('Testing prefix', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof prefix === 'function', 'prefix is a Function'); - //t.deepEqual(prefix(args..), 'Expected'); - //t.equal(prefix(args..), 'Expected'); - //t.false(prefix(args..), 'Expected'); - //t.throws(prefix(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('prefix is a Function', () => { + expect(prefix).toBeInstanceOf(Function); +}); diff --git a/test/prettyBytes/prettyBytes.test.js b/test/prettyBytes/prettyBytes.test.js index 7553e5304..4bf4e3794 100644 --- a/test/prettyBytes/prettyBytes.test.js +++ b/test/prettyBytes/prettyBytes.test.js @@ -1,17 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const prettyBytes = require('./prettyBytes.js'); -test('Testing prettyBytes', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof prettyBytes === 'function', 'prettyBytes is a Function'); - t.equal(prettyBytes(1000), '1 KB', "Converts a number in bytes to a human-readable string."); - t.equal(prettyBytes(-27145424323.5821, 5), '-27.145 GB', "Converts a number in bytes to a human-readable string."); - t.equal(prettyBytes(123456789, 3, false), '123MB', "Converts a number in bytes to a human-readable string."); - - //t.deepEqual(prettyBytes(args..), 'Expected'); - //t.equal(prettyBytes(args..), 'Expected'); - //t.false(prettyBytes(args..), 'Expected'); - //t.throws(prettyBytes(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('prettyBytes is a Function', () => { + expect(prettyBytes).toBeInstanceOf(Function); +}); +test('Converts a number in bytes to a human-readable string.', () => { + expect(prettyBytes(1000)).toBe('1 KB'); +}); +test('Converts a number in bytes to a human-readable string.', () => { + expect(prettyBytes(-27145424323.5821, 5)).toBe('-27.145 GB'); +}); +test('Converts a number in bytes to a human-readable string.', () => { + expect(prettyBytes(123456789, 3, false)).toBe('123MB'); +}); diff --git a/test/primes/primes.test.js b/test/primes/primes.test.js index d64602713..b0561c953 100644 --- a/test/primes/primes.test.js +++ b/test/primes/primes.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const primes = require('./primes.js'); -test('Testing primes', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof primes === 'function', 'primes is a Function'); - t.deepEqual(primes(10), [2, 3, 5, 7], "Generates primes up to a given number, using the Sieve of Eratosthenes."); - //t.deepEqual(primes(args..), 'Expected'); - //t.equal(primes(args..), 'Expected'); - //t.false(primes(args..), 'Expected'); - //t.throws(primes(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('primes is a Function', () => { + expect(primes).toBeInstanceOf(Function); +}); +test('Generates primes up to a given number, using the Sieve of Eratosthenes.', () => { + expect(primes(10)).toEqual([2, 3, 5, 7]); +}); diff --git a/test/promisify/promisify.test.js b/test/promisify/promisify.test.js index cd313631e..9a65b98fc 100644 --- a/test/promisify/promisify.test.js +++ b/test/promisify/promisify.test.js @@ -1,17 +1,14 @@ -const test = require('tape'); +const expect = require('expect'); const promisify = require('./promisify.js'); -test('Testing promisify', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof promisify === 'function', 'promisify is a Function'); - const x = promisify(Math.max); - t.true(x() instanceof Promise, 'Returns a promise'); - const delay = promisify((d, cb) => setTimeout(cb, d)); - delay(200).then(() => t.pass('Runs the function provided')); - //t.deepEqual(promisify(args..), 'Expected'); - //t.equal(promisify(args..), 'Expected'); - //t.false(promisify(args..), 'Expected'); - //t.throws(promisify(args..), 'Expected'); - t.end(); +test('promisify is a Function', () => { + expect(promisify).toBeInstanceOf(Function); +}); +const x = promisify(Math.max); +test('Returns a promise', () => { + expect(x() instanceof Promise).toBeTruthy(); +}); +test('Runs the function provided', () => { + const delay = promisify((d, cb) => setTimeout(cb, d)); + delay(200).then(() => expect(true).toBeTruthy()); }); diff --git a/test/pull/pull.test.js b/test/pull/pull.test.js index 81299a3f8..3afff9097 100644 --- a/test/pull/pull.test.js +++ b/test/pull/pull.test.js @@ -1,16 +1,11 @@ -const test = require('tape'); +const expect = require('expect'); const pull = require('./pull.js'); -test('Testing pull', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof pull === 'function', 'pull is a Function'); - let myArray = ['a', 'b', 'c', 'a', 'b', 'c']; - pull(myArray, 'a', 'c'); - t.deepEqual(myArray, ['b','b'], 'Pulls the specified values'); - //t.deepEqual(pull(args..), 'Expected'); - //t.equal(pull(args..), 'Expected'); - //t.false(pull(args..), 'Expected'); - //t.throws(pull(args..), 'Expected'); - t.end(); +test('pull is a Function', () => { + expect(pull).toBeInstanceOf(Function); +}); +let myArray = ['a', 'b', 'c', 'a', 'b', 'c']; +pull(myArray, 'a', 'c'); +test('Pulls the specified values', () => { + expect(myArray).toEqual(['b','b']); }); diff --git a/test/pullAtIndex/pullAtIndex.test.js b/test/pullAtIndex/pullAtIndex.test.js index 7ee05dc01..4ebe0b1a5 100644 --- a/test/pullAtIndex/pullAtIndex.test.js +++ b/test/pullAtIndex/pullAtIndex.test.js @@ -1,17 +1,14 @@ -const test = require('tape'); +const expect = require('expect'); const pullAtIndex = require('./pullAtIndex.js'); -test('Testing pullAtIndex', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof pullAtIndex === 'function', 'pullAtIndex is a Function'); - let myArray = ['a', 'b', 'c', 'd']; - let pulled = pullAtIndex(myArray, [1, 3]); - t.deepEqual(myArray, [ 'a', 'c' ], 'Pulls the given values'); - t.deepEqual(pulled, [ 'b', 'd' ], 'Pulls the given values'); - //t.deepEqual(pullAtIndex(args..), 'Expected'); - //t.equal(pullAtIndex(args..), 'Expected'); - //t.false(pullAtIndex(args..), 'Expected'); - //t.throws(pullAtIndex(args..), 'Expected'); - t.end(); +test('pullAtIndex is a Function', () => { + expect(pullAtIndex).toBeInstanceOf(Function); +}); +let myArray = ['a', 'b', 'c', 'd']; +let pulled = pullAtIndex(myArray, [1, 3]); +test('Pulls the given values', () => { + expect(myArray).toEqual([ 'a', 'c' ]); +}); + test('Pulls the given values', () => { + expect(pulled).toEqual([ 'b', 'd' ]); }); diff --git a/test/pullAtValue/pullAtValue.test.js b/test/pullAtValue/pullAtValue.test.js index 00e22c122..778f215bc 100644 --- a/test/pullAtValue/pullAtValue.test.js +++ b/test/pullAtValue/pullAtValue.test.js @@ -1,17 +1,14 @@ -const test = require('tape'); +const expect = require('expect'); const pullAtValue = require('./pullAtValue.js'); -test('Testing pullAtValue', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof pullAtValue === 'function', 'pullAtValue is a Function'); - let myArray = ['a', 'b', 'c', 'd']; - let pulled = pullAtValue(myArray, ['b', 'd']); - t.deepEqual(myArray, [ 'a', 'c' ], 'Pulls the specified values'); - t.deepEqual(pulled, [ 'b', 'd' ], 'Pulls the specified values'); - //t.deepEqual(pullAtValue(args..), 'Expected'); - //t.equal(pullAtValue(args..), 'Expected'); - //t.false(pullAtValue(args..), 'Expected'); - //t.throws(pullAtValue(args..), 'Expected'); - t.end(); +test('pullAtValue is a Function', () => { + expect(pullAtValue).toBeInstanceOf(Function); +}); +let myArray = ['a', 'b', 'c', 'd']; +let pulled = pullAtValue(myArray, ['b', 'd']); +test('Pulls the specified values', () => { + expect(myArray).toEqual([ 'a', 'c' ]); +}); + test('Pulls the specified values', () => { + expect(pulled).toEqual([ 'b', 'd' ]); }); diff --git a/test/pullBy/pullBy.test.js b/test/pullBy/pullBy.test.js index 29082d3e0..a1a7f1852 100644 --- a/test/pullBy/pullBy.test.js +++ b/test/pullBy/pullBy.test.js @@ -1,16 +1,11 @@ -const test = require('tape'); +const expect = require('expect'); const pullBy = require('./pullBy.js'); -test('Testing pullBy', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof pullBy === 'function', 'pullBy is a Function'); - var myArray = [{ x: 1 }, { x: 2 }, { x: 3 }, { x: 1 }]; - pullBy(myArray, [{ x: 1 }, { x: 3 }], o => o.x); - t.deepEqual(myArray, [{ x: 2 }], 'Pulls the specified values'); - //t.deepEqual(pullBy(args..), 'Expected'); - //t.equal(pullBy(args..), 'Expected'); - //t.false(pullBy(args..), 'Expected'); - //t.throws(pullBy(args..), 'Expected'); - t.end(); +test('pullBy is a Function', () => { + expect(pullBy).toBeInstanceOf(Function); +}); +var myArray = [{ x: 1 }, { x: 2 }, { x: 3 }, { x: 1 }]; +pullBy(myArray, [{ x: 1 }, { x: 3 }], o => o.x); +test('Pulls the specified values', () => { + expect(myArray).toEqual([{ x: 2 }]); }); diff --git a/test/quickSort/quickSort.test.js b/test/quickSort/quickSort.test.js index 86ef548a4..b15e58969 100644 --- a/test/quickSort/quickSort.test.js +++ b/test/quickSort/quickSort.test.js @@ -1,22 +1,33 @@ -const test = require('tape'); +const expect = require('expect'); const quickSort = require('./quickSort.js'); -test('Testing quickSort', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof quickSort === 'function', 'quickSort is a Function'); - t.deepEqual(quickSort([5, 6, 4, 3, 1, 2]), [1, 2, 3, 4, 5, 6], 'quickSort([5, 6, 4, 3, 1, 2]) returns [1, 2, 3, 4, 5, 6]'); - t.deepEqual(quickSort([-1, 0, -2]), [-2, -1, 0], 'quickSort([-1, 0, -2]) returns [-2, -1, 0]'); - t.throws(() => quickSort(), 'quickSort() throws an error'); - t.throws(() => quickSort(123), 'quickSort(123) throws an error'); - t.throws(() => quickSort({ 234: string}), 'quickSort({ 234: string}) throws an error'); - t.throws(() => quickSort(null), 'quickSort(null) throws an error'); - t.throws(() => quickSort(undefined), 'quickSort(undefined) throws an error'); - - let start = new Date().getTime(); - quickSort([11, 1, 324, 23232, -1, 53, 2, 524, 32, 13, 156, 133, 62, 12, 4]); - let end = new Date().getTime(); - t.true((end - start) < 2000, 'quickSort([11, 1, 324, 23232, -1, 53, 2, 524, 32, 13, 156, 133, 62, 12, 4]) takes less than 2s to run'); - - t.end(); +test('quickSort is a Function', () => { + expect(quickSort).toBeInstanceOf(Function); +}); +test('quickSort([5, 6, 4, 3, 1, 2]) returns [1, 2, 3, 4, 5, 6]', () => { + expect(quickSort([5, 6, 4, 3, 1, 2])).toEqual([1, 2, 3, 4, 5, 6]); +}); +test('quickSort([-1, 0, -2]) returns [-2, -1, 0]', () => { + expect(quickSort([-1, 0, -2])).toEqual([-2, -1, 0]); +}); +test('quickSort() throws an error', () => { + expect(() => { quickSort(); }).toThrow(); +}); +test('quickSort(123) throws an error', () => { + expect(() => { quickSort(123); }).toThrow(); +}); +test('quickSort({ 234: string}) throws an error', () => { + expect(() => { quickSort({ 234: string}); }).toThrow(); +}); +test('quickSort(null) throws an error', () => { + expect(() => { quickSort(null); }).toThrow(); +}); +test('quickSort(undefined) throws an error', () => { + expect(() => { quickSort(undefined); }).toThrow(); +}); +let start = new Date().getTime(); +quickSort([11, 1, 324, 23232, -1, 53, 2, 524, 32, 13, 156, 133, 62, 12, 4]); +let end = new Date().getTime(); +test('quickSort([11, 1, 324, 23232, -1, 53, 2, 524, 32, 13, 156, 133, 62, 12, 4]) takes less than 2s to run', () => { + expect((end - start) < 2000).toBeTruthy(); }); diff --git a/test/radsToDegrees/radsToDegrees.test.js b/test/radsToDegrees/radsToDegrees.test.js index 446485d76..5e7bdea5c 100644 --- a/test/radsToDegrees/radsToDegrees.test.js +++ b/test/radsToDegrees/radsToDegrees.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const radsToDegrees = require('./radsToDegrees.js'); -test('Testing radsToDegrees', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof radsToDegrees === 'function', 'radsToDegrees is a Function'); - t.equal(radsToDegrees(Math.PI / 2), 90, 'Returns the appropriate value'); - //t.deepEqual(radsToDegrees(args..), 'Expected'); - //t.equal(radsToDegrees(args..), 'Expected'); - //t.false(radsToDegrees(args..), 'Expected'); - //t.throws(radsToDegrees(args..), 'Expected'); - t.end(); +test('radsToDegrees is a Function', () => { + expect(radsToDegrees).toBeInstanceOf(Function); +}); +test('Returns the appropriate value', () => { + expect(radsToDegrees(Math.PI / 2)).toBe(90); }); diff --git a/test/randomHexColorCode/randomHexColorCode.test.js b/test/randomHexColorCode/randomHexColorCode.test.js index 7d9946955..bc38748a7 100644 --- a/test/randomHexColorCode/randomHexColorCode.test.js +++ b/test/randomHexColorCode/randomHexColorCode.test.js @@ -1,15 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const randomHexColorCode = require('./randomHexColorCode.js'); -test('Testing randomHexColorCode', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof randomHexColorCode === 'function', 'randomHexColorCode is a Function'); - //t.deepEqual(randomHexColorCode(args..), 'Expected'); - t.equal(randomHexColorCode().length, 7); - t.true(randomHexColorCode().startsWith('#'),'The color code starts with "#"'); - t.true(randomHexColorCode().slice(1).match(/[^0123456789abcdef]/i) === null,'The color code contains only valid hex-digits'); - //t.false(randomHexColorCode(args..), 'Expected'); - //t.throws(randomHexColorCode(args..), 'Expected'); - t.end(); +test('randomHexColorCode is a Function', () => { + expect(randomHexColorCode).toBeInstanceOf(Function); +}); +test('randomHexColorCode has to proper length', () => { + expect(randomHexColorCode().length).toBe(7); +}); +test('The color code starts with "#"', () => { + expect(randomHexColorCode().startsWith('#')).toBeTruthy(); +}); +test('The color code contains only valid hex-digits', () => { + expect(randomHexColorCode().slice(1).match(/[^0123456789abcdef]/i) === null).toBeTruthy(); }); diff --git a/test/randomIntArrayInRange/randomIntArrayInRange.test.js b/test/randomIntArrayInRange/randomIntArrayInRange.test.js index 093fdba64..9a2c1acb3 100644 --- a/test/randomIntArrayInRange/randomIntArrayInRange.test.js +++ b/test/randomIntArrayInRange/randomIntArrayInRange.test.js @@ -1,19 +1,18 @@ -const test = require('tape'); +const expect = require('expect'); const randomIntArrayInRange = require('./randomIntArrayInRange.js'); -test('Testing randomIntArrayInRange', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof randomIntArrayInRange === 'function', 'randomIntArrayInRange is a Function'); - const lowerLimit = Math.floor(Math.random() * 20); - const upperLimit = Math.floor(lowerLimit + Math.random() * 10); - const arr = randomIntArrayInRange(lowerLimit,upperLimit, 10); - t.true(arr.every(x => typeof x === 'number'), 'The returned array contains only integers'); - t.equal(arr.length, 10, 'The returned array has the proper length'); - t.true(arr.every(x => (x >= lowerLimit) && (x <= upperLimit)),'The returned array\'s values lie between provided lowerLimit and upperLimit (both inclusive).'); - //t.deepEqual(randomIntArrayInRange(args..), 'Expected'); - //t.equal(randomIntArrayInRange(args..), 'Expected'); - //t.false(randomIntArrayInRange(args..), 'Expected'); - //t.throws(randomIntArrayInRange(args..), 'Expected'); - t.end(); +test('randomIntArrayInRange is a Function', () => { + expect(randomIntArrayInRange).toBeInstanceOf(Function); +}); +const lowerLimit = Math.floor(Math.random() * 20); +const upperLimit = Math.floor(lowerLimit + Math.random() * 10); +const arr = randomIntArrayInRange(lowerLimit,upperLimit, 10); +test('The returned array contains only integers', () => { + expect(arr.every(x => typeof x === 'number')).toBeTruthy(); +}); +test('The returned array has the proper length', () => { + expect(arr.length).toBe(10); +}); +test('The returned array\'s values lie between provided lowerLimit and upperLimit (both inclusive).', () => { + expect(arr.every(x => (x >= lowerLimit) && (x <= upperLimit))).toBeTruthy(); }); diff --git a/test/randomIntegerInRange/randomIntegerInRange.test.js b/test/randomIntegerInRange/randomIntegerInRange.test.js index 41309c7e5..ff19ca7f9 100644 --- a/test/randomIntegerInRange/randomIntegerInRange.test.js +++ b/test/randomIntegerInRange/randomIntegerInRange.test.js @@ -1,18 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const randomIntegerInRange = require('./randomIntegerInRange.js'); -test('Testing randomIntegerInRange', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof randomIntegerInRange === 'function', 'randomIntegerInRange is a Function'); - const lowerLimit = Math.floor(Math.random() * 20); - const upperLimit = Math.floor(lowerLimit + Math.random() * 10); - t.true(Number.isInteger(randomIntegerInRange(lowerLimit,upperLimit)),'The returned value is an integer'); - const numberForTest = randomIntegerInRange(lowerLimit,upperLimit); - t.true((numberForTest >= lowerLimit) && (numberForTest <= upperLimit),'The returned value lies between provided lowerLimit and upperLimit (both inclusive).'); - //t.deepEqual(randomIntegerInRange(args..), 'Expected'); - //t.equal(randomIntegerInRange(args..), 'Expected'); - //t.false(randomIntegerInRange(args..), 'Expected'); - //t.throws(randomIntegerInRange(args..), 'Expected'); - t.end(); +test('randomIntegerInRange is a Function', () => { + expect(randomIntegerInRange).toBeInstanceOf(Function); +}); +const lowerLimit = Math.floor(Math.random() * 20); +const upperLimit = Math.floor(lowerLimit + Math.random() * 10); +test('The returned value is an integer', () => { + expect(Number.isInteger(randomIntegerInRange(lowerLimit,upperLimit))).toBeTruthy(); +}); +const numberForTest = randomIntegerInRange(lowerLimit,upperLimit); +test('The returned value lies between provided lowerLimit and upperLimit (both inclusive).', () => { + expect((numberForTest >= lowerLimit) && (numberForTest <= upperLimit)).toBeTruthy(); }); diff --git a/test/randomNumberInRange/randomNumberInRange.test.js b/test/randomNumberInRange/randomNumberInRange.test.js index 15359481d..b688cf3fe 100644 --- a/test/randomNumberInRange/randomNumberInRange.test.js +++ b/test/randomNumberInRange/randomNumberInRange.test.js @@ -1,18 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const randomNumberInRange = require('./randomNumberInRange.js'); -test('Testing randomNumberInRange', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof randomNumberInRange === 'function', 'randomNumberInRange is a Function'); - const lowerLimit = Math.floor(Math.random() * 20); - const upperLimit = Math.floor(lowerLimit + Math.random() * 10); - t.true(typeof randomNumberInRange(lowerLimit,upperLimit) === 'number','The returned value is a number'); - const numberForTest = randomNumberInRange(lowerLimit,upperLimit); - t.true((numberForTest >= lowerLimit) && (numberForTest <= upperLimit),'The returned value lies between provided lowerLimit and upperLimit (both inclusive).'); - //t.deepEqual(randomNumberInRange(args..), 'Expected'); - //t.equal(randomNumberInRange(args..), 'Expected'); - //t.false(randomNumberInRange(args..), 'Expected'); - //t.throws(randomNumberInRange(args..), 'Expected'); - t.end(); +test('randomNumberInRange is a Function', () => { + expect(randomNumberInRange).toBeInstanceOf(Function); +}); +const lowerLimit = Math.floor(Math.random() * 20); +const upperLimit = Math.floor(lowerLimit + Math.random() * 10); +test('The returned value is a number', () => { + expect(typeof randomNumberInRange(lowerLimit,upperLimit) === 'number').toBeTruthy(); +}); +const numberForTest = randomNumberInRange(lowerLimit,upperLimit); +test('The returned value lies between provided lowerLimit and upperLimit (both inclusive).', () => { + expect((numberForTest >= lowerLimit) && (numberForTest <= upperLimit)).toBeTruthy(); }); diff --git a/test/readFileLines/readFileLines.test.js b/test/readFileLines/readFileLines.test.js index db0658908..604c87d79 100644 --- a/test/readFileLines/readFileLines.test.js +++ b/test/readFileLines/readFileLines.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const readFileLines = require('./readFileLines.js'); -test('Testing readFileLines', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof readFileLines === 'function', 'readFileLines is a Function'); - t.pass('Tested on 09/02/2018 by @chalarangelo'); - //t.deepEqual(readFileLines(args..), 'Expected'); - //t.equal(readFileLines(args..), 'Expected'); - //t.false(readFileLines(args..), 'Expected'); - //t.throws(readFileLines(args..), 'Expected'); - t.end(); +test('readFileLines is a Function', () => { + expect(readFileLines).toBeInstanceOf(Function); }); diff --git a/test/rearg/rearg.test.js b/test/rearg/rearg.test.js index 781b5c5a0..28a589db3 100644 --- a/test/rearg/rearg.test.js +++ b/test/rearg/rearg.test.js @@ -1,20 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const rearg = require('./rearg.js'); -test('Testing rearg', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof rearg === 'function', 'rearg is a Function'); - var rearged = rearg( - function(a, b, c) { - return [a, b, c]; - }, - [2, 0, 1] - ); - t.deepEqual(rearged('b', 'c', 'a'), ['a', 'b', 'c'], 'Reorders arguments in invoked function'); - //t.deepEqual(rearg(args..), 'Expected'); - //t.equal(rearg(args..), 'Expected'); - //t.false(rearg(args..), 'Expected'); - //t.throws(rearg(args..), 'Expected'); - t.end(); +test('rearg is a Function', () => { + expect(rearg).toBeInstanceOf(Function); +}); +var rearged = rearg( + function(a, b, c) { + return [a, b, c]; + }, + [2, 0, 1] +); +test('Reorders arguments in invoked function', () => { + expect(rearged('b', 'c', 'a')).toEqual(['a', 'b', 'c']); }); diff --git a/test/recordAnimationFrames/recordAnimationFrames.test.js b/test/recordAnimationFrames/recordAnimationFrames.test.js index 2d366d62a..7c95d8452 100644 --- a/test/recordAnimationFrames/recordAnimationFrames.test.js +++ b/test/recordAnimationFrames/recordAnimationFrames.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const recordAnimationFrames = require('./recordAnimationFrames.js'); -test('Testing recordAnimationFrames', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof recordAnimationFrames === 'function', 'recordAnimationFrames is a Function'); - //t.deepEqual(recordAnimationFrames(args..), 'Expected'); - //t.equal(recordAnimationFrames(args..), 'Expected'); - //t.false(recordAnimationFrames(args..), 'Expected'); - //t.throws(recordAnimationFrames(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('recordAnimationFrames is a Function', () => { + expect(recordAnimationFrames).toBeInstanceOf(Function); +}); diff --git a/test/redirect/redirect.test.js b/test/redirect/redirect.test.js index d6dbce35d..831a1d75d 100644 --- a/test/redirect/redirect.test.js +++ b/test/redirect/redirect.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const redirect = require('./redirect.js'); -test('Testing redirect', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof redirect === 'function', 'redirect is a Function'); - t.pass('Tested on 09/02/2018 by @chalarangelo'); - //t.deepEqual(redirect(args..), 'Expected'); - //t.equal(redirect(args..), 'Expected'); - //t.false(redirect(args..), 'Expected'); - //t.throws(redirect(args..), 'Expected'); - t.end(); +test('redirect is a Function', () => { + expect(redirect).toBeInstanceOf(Function); }); diff --git a/test/reduceSuccessive/reduceSuccessive.test.js b/test/reduceSuccessive/reduceSuccessive.test.js index 411438820..5045bed01 100644 --- a/test/reduceSuccessive/reduceSuccessive.test.js +++ b/test/reduceSuccessive/reduceSuccessive.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const reduceSuccessive = require('./reduceSuccessive.js'); -test('Testing reduceSuccessive', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof reduceSuccessive === 'function', 'reduceSuccessive is a Function'); - t.deepEqual(reduceSuccessive([1, 2, 3, 4, 5, 6], (acc, val) => acc + val, 0), [0, 1, 3, 6, 10, 15, 21], 'Returns the array of successively reduced values'); - //t.deepEqual(reduceSuccessive(args..), 'Expected'); - //t.equal(reduceSuccessive(args..), 'Expected'); - //t.false(reduceSuccessive(args..), 'Expected'); - //t.throws(reduceSuccessive(args..), 'Expected'); - t.end(); +test('reduceSuccessive is a Function', () => { + expect(reduceSuccessive).toBeInstanceOf(Function); +}); +test('Returns the array of successively reduced values', () => { + expect(reduceSuccessive([1, 2, 3, 4, 5, 6], (acc, val) => acc + val, 0)).toEqual([0, 1, 3, 6, 10, 15, 21]); }); diff --git a/test/reduceWhich/reduceWhich.test.js b/test/reduceWhich/reduceWhich.test.js index 7e38f36d0..dc9625699 100644 --- a/test/reduceWhich/reduceWhich.test.js +++ b/test/reduceWhich/reduceWhich.test.js @@ -1,19 +1,18 @@ -const test = require('tape'); +const expect = require('expect'); const reduceWhich = require('./reduceWhich.js'); -test('Testing reduceWhich', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof reduceWhich === 'function', 'reduceWhich is a Function'); - t.equal(reduceWhich([1, 3, 2]), 1, 'Returns the minimum of an array'); - t.equal(reduceWhich([1, 3, 2], (a, b) => b - a), 3, 'Returns the maximum of an array'); - t.deepEqual(reduceWhich( +test('reduceWhich is a Function', () => { + expect(reduceWhich).toBeInstanceOf(Function); +}); +test('Returns the minimum of an array', () => { + expect(reduceWhich([1, 3, 2])).toBe(1); +}); +test('Returns the maximum of an array', () => { + expect(reduceWhich([1, 3, 2], (a, b) => b - a)).toBe(3); +}); +test('Returns the object with the minimum specified value in an array', () => { + expect(reduceWhich( [{ name: 'Tom', age: 12 }, { name: 'Jack', age: 18 }, { name: 'Lucy', age: 9 }], (a, b) => a.age - b.age -), {name: "Lucy", age: 9}, 'Returns the object with the minimum specified value in an array'); - //t.deepEqual(reduceWhich(args..), 'Expected'); - //t.equal(reduceWhich(args..), 'Expected'); - //t.false(reduceWhich(args..), 'Expected'); - //t.throws(reduceWhich(args..), 'Expected'); - t.end(); +)).toEqual({name: "Lucy", age: 9}); }); diff --git a/test/reducedFilter/reducedFilter.test.js b/test/reducedFilter/reducedFilter.test.js index db6dcdc9e..4fb7a0b94 100644 --- a/test/reducedFilter/reducedFilter.test.js +++ b/test/reducedFilter/reducedFilter.test.js @@ -1,26 +1,21 @@ -const test = require('tape'); +const expect = require('expect'); const reducedFilter = require('./reducedFilter.js'); -test('Testing reducedFilter', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof reducedFilter === 'function', 'reducedFilter is a Function'); - const data = [ - { - id: 1, - name: 'john', - age: 24 - }, - { - id: 2, - name: 'mike', - age: 50 - } - ]; - t.deepEqual(reducedFilter(data, ['id', 'name'], item => item.age > 24), [{ id: 2, name: 'mike'}], "Filter an array of objects based on a condition while also filtering out unspecified keys."); - //t.deepEqual(reducedFilter(args..), 'Expected'); - //t.equal(reducedFilter(args..), 'Expected'); - //t.false(reducedFilter(args..), 'Expected'); - //t.throws(reducedFilter(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('reducedFilter is a Function', () => { + expect(reducedFilter).toBeInstanceOf(Function); +}); +const data = [ +{ + id: 1, + name: 'john', + age: 24 +}, +{ + id: 2, + name: 'mike', + age: 50 +} +]; +test('Filter an array of objects based on a condition while also filtering out unspecified keys.', () => { + expect(reducedFilter(data, ['id', 'name'], item => item.age > 24)).toEqual([{ id: 2, name: 'mike'}]); +}); diff --git a/test/reject/reject.test.js b/test/reject/reject.test.js index a82244682..f14e41299 100644 --- a/test/reject/reject.test.js +++ b/test/reject/reject.test.js @@ -1,24 +1,20 @@ -const test = require('tape'); +const expect = require('expect'); const reject = require('./reject.js'); -test('Testing reject', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof reject === 'function', 'reject is a Function'); - - const noEvens = reject( - (x) => x % 2 === 0, - [1, 2, 3, 4, 5] - ); - - t.deepEqual(noEvens, [1, 3, 5]); - - const fourLettersOrLess = reject( - (word) => word.length > 4, - ['Apple', 'Pear', 'Kiwi', 'Banana'] - ); - - t.deepEqual(fourLettersOrLess, ['Pear', 'Kiwi']); - - t.end(); +test('reject is a Function', () => { + expect(reject).toBeInstanceOf(Function); +}); +const noEvens = reject( + (x) => x % 2 === 0, + [1, 2, 3, 4, 5] +); +test('Works with numbers', () => { + expect(noEvens).toEqual([1, 3, 5]); +}); +const fourLettersOrLess = reject( + (word) => word.length > 4, + ['Apple', 'Pear', 'Kiwi', 'Banana'] +); +test('Works with strings', () => { + expect(fourLettersOrLess).toEqual(['Pear', 'Kiwi']); }); diff --git a/test/remove/remove.test.js b/test/remove/remove.test.js index 64c00696c..efafcc3da 100644 --- a/test/remove/remove.test.js +++ b/test/remove/remove.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const remove = require('./remove.js'); -test('Testing remove', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof remove === 'function', 'remove is a Function'); - t.deepEqual(remove([1, 2, 3, 4], n => n % 2 === 0), [2, 4], "Removes elements from an array for which the given function returns false"); - //t.deepEqual(remove(args..), 'Expected'); - //t.equal(remove(args..), 'Expected'); - //t.false(remove(args..), 'Expected'); - //t.throws(remove(args..), 'Expected'); - t.end(); +test('remove is a Function', () => { + expect(remove).toBeInstanceOf(Function); +}); +test('Removes elements from an array for which the given function returns false', () => { + expect(remove([1, 2, 3, 4], n => n % 2 === 0)).toEqual([2, 4]); }); diff --git a/test/removeNonASCII/removeNonASCII.test.js b/test/removeNonASCII/removeNonASCII.test.js index 03aedfed1..4e8f6f7bd 100644 --- a/test/removeNonASCII/removeNonASCII.test.js +++ b/test/removeNonASCII/removeNonASCII.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const removeNonASCII = require('./removeNonASCII.js'); -test('Testing removeNonASCII', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof removeNonASCII === 'function', 'removeNonASCII is a Function'); - t.equal(removeNonASCII('äÄçÇéÉêlorem-ipsumöÖÐþúÚ'), 'lorem-ipsum', 'Removes non-ASCII characters'); - //t.deepEqual(removeNonASCII(args..), 'Expected'); - //t.equal(removeNonASCII(args..), 'Expected'); - //t.false(removeNonASCII(args..), 'Expected'); - //t.throws(removeNonASCII(args..), 'Expected'); - t.end(); +test('removeNonASCII is a Function', () => { + expect(removeNonASCII).toBeInstanceOf(Function); +}); +test('Removes non-ASCII characters', () => { + expect(removeNonASCII('äÄçÇéÉêlorem-ipsumöÖÐþúÚ')).toBe('lorem-ipsum'); }); diff --git a/test/removeVowels/removeVowels.test.js b/test/removeVowels/removeVowels.test.js index 67a187869..437f32157 100644 --- a/test/removeVowels/removeVowels.test.js +++ b/test/removeVowels/removeVowels.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const removeVowels = require('./removeVowels.js'); -test('Testing removeVowels', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof removeVowels === 'function', 'removeVowels is a Function'); - //t.deepEqual(removeVowels(args..), 'Expected'); - //t.equal(removeVowels(args..), 'Expected'); - //t.false(removeVowels(args..), 'Expected'); - //t.throws(removeVowels(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('removeVowels is a Function', () => { + expect(removeVowels).toBeInstanceOf(Function); +}); diff --git a/test/renameKeys/renameKeys.test.js b/test/renameKeys/renameKeys.test.js index 42900ec17..574c18289 100644 --- a/test/renameKeys/renameKeys.test.js +++ b/test/renameKeys/renameKeys.test.js @@ -1,15 +1,11 @@ -const test = require('tape'); +const expect = require('expect'); const renameKeys = require('./renameKeys.js'); -test('Testing renameKeys', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof renameKeys === 'function', 'renameKeys is a Function'); - - const obj = { name: 'Bobo', job: 'Front-End Master', shoeSize: 100 }; - const renamedObj = renameKeys({ name: 'firstName', job: 'passion' }, obj); - - t.deepEqual(renamedObj, { firstName: 'Bobo', passion: 'Front-End Master', shoeSize: 100 }); - - t.end(); +test('renameKeys is a Function', () => { + expect(renameKeys).toBeInstanceOf(Function); +}); +const obj = { name: 'Bobo', job: 'Front-End Master', shoeSize: 100 }; +const renamedObj = renameKeys({ name: 'firstName', job: 'passion' }, obj); +test('renameKeys is a Function', () => { + expect(renamedObj).toEqual({ firstName: 'Bobo', passion: 'Front-End Master', shoeSize: 100 }); }); diff --git a/test/reverseString/reverseString.test.js b/test/reverseString/reverseString.test.js index 7aeca53df..8eef925d7 100644 --- a/test/reverseString/reverseString.test.js +++ b/test/reverseString/reverseString.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const reverseString = require('./reverseString.js'); -test('Testing reverseString', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof reverseString === 'function', 'reverseString is a Function'); - t.equal(reverseString('foobar'), 'raboof', "Reverses a string."); - //t.deepEqual(reverseString(args..), 'Expected'); - //t.equal(reverseString(args..), 'Expected'); - //t.false(reverseString(args..), 'Expected'); - //t.throws(reverseString(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('reverseString is a Function', () => { + expect(reverseString).toBeInstanceOf(Function); +}); +test('Reverses a string.', () => { + expect(reverseString('foobar')).toBe('raboof'); +}); diff --git a/test/round/round.test.js b/test/round/round.test.js index 2aa705899..c72bb69c9 100644 --- a/test/round/round.test.js +++ b/test/round/round.test.js @@ -1,23 +1,39 @@ -const test = require('tape'); +const expect = require('expect'); const round = require('./round.js'); -test('Testing round', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof round === 'function', 'round is a Function'); - t.equal(round(1.005, 2), 1.01, "round(1.005, 2) returns 1.01"); - t.equal(round(123.3423345345345345344, 11), 123.34233453453, "round(123.3423345345345345344, 11) returns 123.34233453453"); - t.equal(round(3.342, 11), 3.342, "round(3.342, 11) returns 3.342"); - t.equal(round(1.005), 1, "round(1.005) returns 1"); - t.true(isNaN(round([1.005, 2])), 'round([1.005, 2]) returns NaN'); - t.true(isNaN(round('string')), 'round(string) returns NaN'); - t.true(isNaN(round()), 'round() returns NaN'); - t.true(isNaN(round(132, 413, 4134)), 'round(132, 413, 4134) returns NaN'); - t.true(isNaN(round({a: 132}, 413)), 'round({a: 132}, 413) returns NaN'); - - let start = new Date().getTime(); - round(123.3423345345345345344, 11); - let end = new Date().getTime(); - t.true((end - start) < 2000, 'round(123.3423345345345345344, 11) takes less than 2s to run'); - t.end(); +test('round is a Function', () => { + expect(round).toBeInstanceOf(Function); +}); +test('round(1.005, 2) returns 1.01', () => { + expect(round(1.005, 2)).toBe(1.01); +}); +test('round(123.3423345345345345344, 11) returns 123.34233453453', () => { + expect(round(123.3423345345345345344, 11)).toBe(123.34233453453); +}); +test('round(3.342, 11) returns 3.342', () => { + expect(round(3.342, 11)).toBe(3.342); +}); +test('round(1.005) returns 1', () => { + expect(round(1.005)).toBe(1); +}); +test('round([1.005, 2]) returns NaN', () => { + expect(isNaN(round([1.005, 2]))).toBeTruthy(); +}); + test('round(string) returns NaN', () => { + expect(isNaN(round('string'))).toBeTruthy(); +}); + test('round() returns NaN', () => { + expect(isNaN(round())).toBeTruthy(); +}); + test('round(132, 413, 4134) returns NaN', () => { + expect(isNaN(round(132, 413, 4134))).toBeTruthy(); +}); + test('round({a: 132}, 413) returns NaN', () => { + expect(isNaN(round({a: 132}, 413))).toBeTruthy(); +}); +let start = new Date().getTime(); +round(123.3423345345345345344, 11); +let end = new Date().getTime(); +test('round(123.3423345345345345344, 11) takes less than 2s to run', () => { + expect((end - start) < 2000).toBeTruthy(); }); diff --git a/test/runAsync/runAsync.test.js b/test/runAsync/runAsync.test.js index cbe70590b..fb2806ed4 100644 --- a/test/runAsync/runAsync.test.js +++ b/test/runAsync/runAsync.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const runAsync = require('./runAsync.js'); -test('Testing runAsync', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof runAsync === 'function', 'runAsync is a Function'); - t.pass('Tested on 09/02/2018 by @chalarangelo'); - //t.deepEqual(runAsync(args..), 'Expected'); - //t.equal(runAsync(args..), 'Expected'); - //t.false(runAsync(args..), 'Expected'); - //t.throws(runAsync(args..), 'Expected'); - t.end(); +test('runAsync is a Function', () => { + expect(runAsync).toBeInstanceOf(Function); }); diff --git a/test/runPromisesInSeries/runPromisesInSeries.test.js b/test/runPromisesInSeries/runPromisesInSeries.test.js index 288878bf2..1fb99d262 100644 --- a/test/runPromisesInSeries/runPromisesInSeries.test.js +++ b/test/runPromisesInSeries/runPromisesInSeries.test.js @@ -1,15 +1,11 @@ -const test = require('tape'); +const expect = require('expect'); const runPromisesInSeries = require('./runPromisesInSeries.js'); -test('Testing runPromisesInSeries', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof runPromisesInSeries === 'function', 'runPromisesInSeries is a Function'); - const delay = d => new Promise(r => setTimeout(r, d)); - runPromisesInSeries([() => delay(100), () => delay(200).then(() => t.pass('Runs promises in series'))]); - //t.deepEqual(runPromisesInSeries(args..), 'Expected'); - //t.equal(runPromisesInSeries(args..), 'Expected'); - //t.false(runPromisesInSeries(args..), 'Expected'); - //t.throws(runPromisesInSeries(args..), 'Expected'); - t.end(); + +test('runPromisesInSeries is a Function', () => { + expect(runPromisesInSeries).toBeInstanceOf(Function); +}); +const delay = d => new Promise(r => setTimeout(r, d)); +test('Runs promises in series', () => { + runPromisesInSeries([() => delay(100), () => delay(200).then(() => expect(true).toBeTruthy())]); }); diff --git a/test/sample/sample.test.js b/test/sample/sample.test.js index 258d58e6f..199f8504b 100644 --- a/test/sample/sample.test.js +++ b/test/sample/sample.test.js @@ -1,17 +1,16 @@ -const test = require('tape'); +const expect = require('expect'); const sample = require('./sample.js'); -test('Testing sample', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof sample === 'function', 'sample is a Function'); - const arr = [3,7,9,11]; - t.true(arr.includes(sample(arr)), 'Returns a random element from the array'); - t.equal(sample([1]), 1, 'Works for single-element arrays'); - t.equal(sample([]), undefined, 'Returns undefined for empty array'); - //t.deepEqual(sample(args..), 'Expected'); - //t.equal(sample(args..), 'Expected'); - //t.false(sample(args..), 'Expected'); - //t.throws(sample(args..), 'Expected'); - t.end(); +test('sample is a Function', () => { + expect(sample).toBeInstanceOf(Function); +}); +const arr = [3,7,9,11]; +test('Returns a random element from the array', () => { + expect(arr.includes(sample(arr))).toBeTruthy(); +}); +test('Works for single-element arrays', () => { + expect(sample([1])).toBe(1); +}); +test('Returns undefined for empty array', () => { + expect(sample([])).toBe(undefined); }); diff --git a/test/sampleSize/sampleSize.test.js b/test/sampleSize/sampleSize.test.js index 6c610fa2d..22d72d238 100644 --- a/test/sampleSize/sampleSize.test.js +++ b/test/sampleSize/sampleSize.test.js @@ -1,19 +1,22 @@ -const test = require('tape'); +const expect = require('expect'); const sampleSize = require('./sampleSize.js'); -test('Testing sampleSize', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof sampleSize === 'function', 'sampleSize is a Function'); - const arr = [3,7,9,11]; - t.equal(sampleSize(arr).length, 1, 'Returns a single element without n specified'); - t.true(sampleSize(arr, 2).every(x => arr.includes(x)), 'Returns a random sample of specified size from an array'); - t.equal(sampleSize(arr, 5).length, 4, 'Returns all elements in an array if n >= length'); - t.deepEqual(sampleSize([], 2), [], 'Returns an empty array if original array is empty'); - t.deepEqual(sampleSize(arr, 0), [], 'Returns an empty array if n = 0'); - //t.deepEqual(sampleSize(args..), 'Expected'); - //t.equal(sampleSize(args..), 'Expected'); - //t.false(sampleSize(args..), 'Expected'); - //t.throws(sampleSize(args..), 'Expected'); - t.end(); +test('sampleSize is a Function', () => { + expect(sampleSize).toBeInstanceOf(Function); +}); +const arr = [3,7,9,11]; +test('Returns a single element without n specified', () => { + expect(sampleSize(arr).length).toBe(1); +}); +test('Returns a random sample of specified size from an array', () => { + expect(sampleSize(arr, 2).every(x => arr.includes(x))).toBeTruthy(); +}); +test('Returns all elements in an array if n >= length', () => { + expect(sampleSize(arr, 5).length).toBe(4); +}); +test('Returns an empty array if original array is empty', () => { + expect(sampleSize([], 2)).toEqual([]); +}); +test('Returns an empty array if n = 0', () => { + expect(sampleSize(arr, 0)).toEqual([]); }); diff --git a/test/scrollToTop/scrollToTop.test.js b/test/scrollToTop/scrollToTop.test.js index 1772b8fe9..c92677b1b 100644 --- a/test/scrollToTop/scrollToTop.test.js +++ b/test/scrollToTop/scrollToTop.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const scrollToTop = require('./scrollToTop.js'); -test('Testing scrollToTop', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof scrollToTop === 'function', 'scrollToTop is a Function'); - t.pass('Tested on 09/02/2018 by @chalarangelo'); - //t.deepEqual(scrollToTop(args..), 'Expected'); - //t.equal(scrollToTop(args..), 'Expected'); - //t.false(scrollToTop(args..), 'Expected'); - //t.throws(scrollToTop(args..), 'Expected'); - t.end(); +test('scrollToTop is a Function', () => { + expect(scrollToTop).toBeInstanceOf(Function); }); diff --git a/test/sdbm/sdbm.test.js b/test/sdbm/sdbm.test.js index 8152041bb..58567bc40 100644 --- a/test/sdbm/sdbm.test.js +++ b/test/sdbm/sdbm.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const sdbm = require('./sdbm.js'); -test('Testing sdbm', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof sdbm === 'function', 'sdbm is a Function'); - t.equal(sdbm('name'), -3521204949, "Hashes the input string into a whole number."); - //t.deepEqual(sdbm(args..), 'Expected'); - //t.equal(sdbm(args..), 'Expected'); - //t.false(sdbm(args..), 'Expected'); - //t.throws(sdbm(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('sdbm is a Function', () => { + expect(sdbm).toBeInstanceOf(Function); +}); +test('Hashes the input string into a whole number.', () => { + expect(sdbm('name')).toBe(-3521204949); +}); diff --git a/test/serializeCookie/serializeCookie.test.js b/test/serializeCookie/serializeCookie.test.js index 45db4324f..211ca7c21 100644 --- a/test/serializeCookie/serializeCookie.test.js +++ b/test/serializeCookie/serializeCookie.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const serializeCookie = require('./serializeCookie.js'); -test('Testing serializeCookie', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof serializeCookie === 'function', 'serializeCookie is a Function'); - t.equal(serializeCookie('foo', 'bar'), 'foo=bar', 'Serializes the cookie'); - //t.deepEqual(serializeCookie(args..), 'Expected'); - //t.equal(serializeCookie(args..), 'Expected'); - //t.false(serializeCookie(args..), 'Expected'); - //t.throws(serializeCookie(args..), 'Expected'); - t.end(); +test('serializeCookie is a Function', () => { + expect(serializeCookie).toBeInstanceOf(Function); +}); +test('Serializes the cookie', () => { + expect(serializeCookie('foo', 'bar')).toBe('foo=bar'); }); diff --git a/test/setStyle/setStyle.test.js b/test/setStyle/setStyle.test.js index 3c8e4aa94..92be89a6e 100644 --- a/test/setStyle/setStyle.test.js +++ b/test/setStyle/setStyle.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const setStyle = require('./setStyle.js'); -test('Testing setStyle', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof setStyle === 'function', 'setStyle is a Function'); - t.pass('Tested by @chalarangelo on 16/02/2018'); - //t.deepEqual(setStyle(args..), 'Expected'); - //t.equal(setStyle(args..), 'Expected'); - //t.false(setStyle(args..), 'Expected'); - //t.throws(setStyle(args..), 'Expected'); - t.end(); -}); +test('setStyle is a Function', () => { + expect(setStyle).toBeInstanceOf(Function); +}); diff --git a/test/shallowClone/shallowClone.test.js b/test/shallowClone/shallowClone.test.js index 71223569b..14c8fdf1c 100644 --- a/test/shallowClone/shallowClone.test.js +++ b/test/shallowClone/shallowClone.test.js @@ -1,17 +1,14 @@ -const test = require('tape'); +const expect = require('expect'); const shallowClone = require('./shallowClone.js'); -test('Testing shallowClone', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof shallowClone === 'function', 'shallowClone is a Function'); - const a = { foo: 'bar', obj: { a: 1, b: 2 } }; - const b = shallowClone(a); - t.notEqual(a, b, 'Shallow cloning works'); - t.equal(a.obj, b.obj, 'Does not clone deeply'); - //t.deepEqual(shallowClone(args..), 'Expected'); - //t.equal(shallowClone(args..), 'Expected'); - //t.false(shallowClone(args..), 'Expected'); - //t.throws(shallowClone(args..), 'Expected'); - t.end(); +test('shallowClone is a Function', () => { + expect(shallowClone).toBeInstanceOf(Function); +}); +const a = { foo: 'bar', obj: { a: 1, b: 2 } }; +const b = shallowClone(a); +test('Shallow cloning works', () => { + expect(a).not.toBe(b); +}); +test('Does not clone deeply', () => { + expect(a.obj).toBe(b.obj); }); diff --git a/test/show/show.test.js b/test/show/show.test.js index 859735338..81c5ea492 100644 --- a/test/show/show.test.js +++ b/test/show/show.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const show = require('./show.js'); -test('Testing show', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof show === 'function', 'show is a Function'); - t.pass('Tested by @chalarangelo on 16/02/2018'); - //t.deepEqual(show(args..), 'Expected'); - //t.equal(show(args..), 'Expected'); - //t.false(show(args..), 'Expected'); - //t.throws(show(args..), 'Expected'); - t.end(); +test('show is a Function', () => { + expect(show).toBeInstanceOf(Function); }); diff --git a/test/shuffle/shuffle.test.js b/test/shuffle/shuffle.test.js index aed55ad03..ae6630c2f 100644 --- a/test/shuffle/shuffle.test.js +++ b/test/shuffle/shuffle.test.js @@ -1,18 +1,19 @@ -const test = require('tape'); +const expect = require('expect'); const shuffle = require('./shuffle.js'); -test('Testing shuffle', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof shuffle === 'function', 'shuffle is a Function'); - const arr = [1,2,3,4,5,6]; - t.notEqual(shuffle(arr), arr, 'Shuffles the array'); - t.true(shuffle(arr).every(x => arr.includes(x)), 'New array contains all original elements'); - t.deepEqual(shuffle([]),[],'Works for empty arrays'); - t.deepEqual(shuffle([1]),[1],'Works for single-element arrays'); - //t.deepEqual(shuffle(args..), 'Expected'); - //t.equal(shuffle(args..), 'Expected'); - //t.false(shuffle(args..), 'Expected'); - //t.throws(shuffle(args..), 'Expected'); - t.end(); +test('shuffle is a Function', () => { + expect(shuffle).toBeInstanceOf(Function); +}); +const arr = [1,2,3,4,5,6]; +test('Shuffles the array', () => { + expect(shuffle(arr)).not.toEqual(arr); +}); +test('New array contains all original elements', () => { + expect(shuffle(arr).every(x => arr.includes(x))).toBeTruthy(); +}); +test('Works for empty arrays', () => { + expect(shuffle([])).toEqual([]); +}); +test('Works for single-element arrays', () => { + expect(shuffle([1])).toEqual([1]); }); diff --git a/test/similarity/similarity.test.js b/test/similarity/similarity.test.js index b82022707..479c64b9c 100644 --- a/test/similarity/similarity.test.js +++ b/test/similarity/similarity.test.js @@ -1,12 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const similarity = require('./similarity.js'); -test('Testing similarity', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof similarity === 'function', 'similarity is a Function'); - t.deepEqual(similarity([1, 2, 3], [1, 2, 4]), [1, 2], "Returns an array of elements that appear in both arrays."); //t.equal(similarity(args..), 'Expected'); - //t.false(similarity(args..), 'Expected'); - //t.throws(similarity(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('similarity is a Function', () => { + expect(similarity).toBeInstanceOf(Function); +}); +test('Returns an array of elements that appear in both arrays.', () => { + expect(similarity([1, 2, 3], [1, 2, 4])).toEqual([1, 2]); +}); diff --git a/test/size/size.test.js b/test/size/size.test.js index 5c8410b23..54622aa01 100644 --- a/test/size/size.test.js +++ b/test/size/size.test.js @@ -1,17 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const size = require('./size.js'); -test('Testing size', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof size === 'function', 'size is a Function'); - t.equal(size([1, 2, 3, 4, 5]), 5, "Get size of arrays, objects or strings."); - // t.equal(size('size'), 4, "Get size of arrays, objects or strings."); DOESN'T WORK IN NODE ENV - t.equal(size({ one: 1, two: 2, three: 3 }), 3, "Get size of arrays, objects or strings."); - - //t.deepEqual(size(args..), 'Expected'); - //t.equal(size(args..), 'Expected'); - //t.false(size(args..), 'Expected'); - //t.throws(size(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('size is a Function', () => { + expect(size).toBeInstanceOf(Function); +}); +test('Get size of arrays, objects or strings.', () => { + expect(size([1, 2, 3, 4, 5])).toBe(5); +}); +test('Get size of arrays, objects or strings.', () => { + expect(size({ one: 1, two: 2, three: 3 })).toBe(3); +}); diff --git a/test/sleep/sleep.test.js b/test/sleep/sleep.test.js index 57beb16e2..faff7c0f2 100644 --- a/test/sleep/sleep.test.js +++ b/test/sleep/sleep.test.js @@ -1,17 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const sleep = require('./sleep.js'); -test('Testing sleep', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof sleep === 'function', 'sleep is a Function'); +test('sleep is a Function', () => { + expect(sleep).toBeInstanceOf(Function); +}); +test('Works as expected', () => { async function sleepyWork() { await sleep(1000); - t.pass('Works as expected'); + expect(true).toBeTruthy(); } - //t.deepEqual(sleep(args..), 'Expected'); - //t.equal(sleep(args..), 'Expected'); - //t.false(sleep(args..), 'Expected'); - //t.throws(sleep(args..), 'Expected'); - t.end(); }); diff --git a/test/smoothScroll/smoothScroll.test.js b/test/smoothScroll/smoothScroll.test.js index e74581e2c..269e7252c 100644 --- a/test/smoothScroll/smoothScroll.test.js +++ b/test/smoothScroll/smoothScroll.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const smoothScroll = require('./smoothScroll.js'); -test('Testing smoothScroll', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof smoothScroll === 'function', 'smoothScroll is a Function'); - //t.deepEqual(smoothScroll(args..), 'Expected'); - //t.equal(smoothScroll(args..), 'Expected'); - //t.false(smoothScroll(args..), 'Expected'); - //t.throws(smoothScroll(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('smoothScroll is a Function', () => { + expect(smoothScroll).toBeInstanceOf(Function); +}); diff --git a/test/solveRPN/solveRPN.test.js b/test/solveRPN/solveRPN.test.js index 78cea6cdf..c6a2fee8b 100644 --- a/test/solveRPN/solveRPN.test.js +++ b/test/solveRPN/solveRPN.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const solveRPN = require('./solveRPN.js'); -test('Testing solveRPN', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof solveRPN === 'function', 'solveRPN is a Function'); - //t.deepEqual(solveRPN(args..), 'Expected'); - //t.equal(solveRPN(args..), 'Expected'); - //t.false(solveRPN(args..), 'Expected'); - //t.throws(solveRPN(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('solveRPN is a Function', () => { + expect(solveRPN).toBeInstanceOf(Function); +}); diff --git a/test/sortCharactersInString/sortCharactersInString.test.js b/test/sortCharactersInString/sortCharactersInString.test.js index 25fc97bd8..8979fe2b7 100644 --- a/test/sortCharactersInString/sortCharactersInString.test.js +++ b/test/sortCharactersInString/sortCharactersInString.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const sortCharactersInString = require('./sortCharactersInString.js'); -test('Testing sortCharactersInString', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof sortCharactersInString === 'function', 'sortCharactersInString is a Function'); - t.equal(sortCharactersInString('cabbage'), 'aabbceg', "Alphabetically sorts the characters in a string."); - //t.deepEqual(sortCharactersInString(args..), 'Expected'); - //t.equal(sortCharactersInString(args..), 'Expected'); - //t.false(sortCharactersInString(args..), 'Expected'); - //t.throws(sortCharactersInString(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('sortCharactersInString is a Function', () => { + expect(sortCharactersInString).toBeInstanceOf(Function); +}); +test('Alphabetically sorts the characters in a string.', () => { + expect(sortCharactersInString('cabbage')).toBe('aabbceg'); +}); diff --git a/test/sortedIndex/sortedIndex.test.js b/test/sortedIndex/sortedIndex.test.js index c60ba058f..0bfe6ff39 100644 --- a/test/sortedIndex/sortedIndex.test.js +++ b/test/sortedIndex/sortedIndex.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const sortedIndex = require('./sortedIndex.js'); -test('Testing sortedIndex', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof sortedIndex === 'function', 'sortedIndex is a Function'); - t.equal(sortedIndex([5, 3, 2, 1], 4), 1, "Returns the lowest index at which value should be inserted into array in order to maintain its sort order."); - t.equal(sortedIndex([30, 50], 40), 1, "Returns the lowest index at which value should be inserted into array in order to maintain its sort order."); - //t.deepEqual(sortedIndex(args..), 'Expected'); - //t.equal(sortedIndex(args..), 'Expected'); - //t.false(sortedIndex(args..), 'Expected'); - //t.throws(sortedIndex(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('sortedIndex is a Function', () => { + expect(sortedIndex).toBeInstanceOf(Function); +}); +test('Returns the lowest index at which value should be inserted into array in order to maintain its sort order.', () => { + expect(sortedIndex([5, 3, 2, 1], 4)).toBe(1); +}); +test('Returns the lowest index at which value should be inserted into array in order to maintain its sort order.', () => { + expect(sortedIndex([30, 50], 40)).toBe(1); +}); diff --git a/test/sortedIndexBy/sortedIndexBy.test.js b/test/sortedIndexBy/sortedIndexBy.test.js index 6f173a5b6..6e02b36a4 100644 --- a/test/sortedIndexBy/sortedIndexBy.test.js +++ b/test/sortedIndexBy/sortedIndexBy.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const sortedIndexBy = require('./sortedIndexBy.js'); -test('Testing sortedIndexBy', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof sortedIndexBy === 'function', 'sortedIndexBy is a Function'); - t.equal(sortedIndexBy([{ x: 4 }, { x: 5 }], { x: 4 }, o => o.x), 0, 'Returns the lowest index to insert the element without messing up the list order'); - //t.deepEqual(sortedIndexBy(args..), 'Expected'); - //t.equal(sortedIndexBy(args..), 'Expected'); - //t.false(sortedIndexBy(args..), 'Expected'); - //t.throws(sortedIndexBy(args..), 'Expected'); - t.end(); +test('sortedIndexBy is a Function', () => { + expect(sortedIndexBy).toBeInstanceOf(Function); +}); +test('Returns the lowest index to insert the element without messing up the list order', () => { + expect(sortedIndexBy([{ x: 4 }, { x: 5 }], { x: 4 }, o => o.x)).toBe(0); }); diff --git a/test/sortedLastIndex/sortedLastIndex.test.js b/test/sortedLastIndex/sortedLastIndex.test.js index a80ef11dc..84a9ff63a 100644 --- a/test/sortedLastIndex/sortedLastIndex.test.js +++ b/test/sortedLastIndex/sortedLastIndex.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const sortedLastIndex = require('./sortedLastIndex.js'); -test('Testing sortedLastIndex', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof sortedLastIndex === 'function', 'sortedLastIndex is a Function'); - t.equal(sortedLastIndex([10, 20, 30, 30, 40], 30), 4, 'Returns the highest index to insert the element without messing up the list order'); - //t.deepEqual(sortedLastIndex(args..), 'Expected'); - //t.equal(sortedLastIndex(args..), 'Expected'); - //t.false(sortedLastIndex(args..), 'Expected'); - //t.throws(sortedLastIndex(args..), 'Expected'); - t.end(); +test('sortedLastIndex is a Function', () => { + expect(sortedLastIndex).toBeInstanceOf(Function); +}); +test('Returns the highest index to insert the element without messing up the list order', () => { + expect(sortedLastIndex([10, 20, 30, 30, 40], 30)).toBe(4); }); diff --git a/test/sortedLastIndexBy/sortedLastIndexBy.test.js b/test/sortedLastIndexBy/sortedLastIndexBy.test.js index e7f19f6e9..ad0bfc718 100644 --- a/test/sortedLastIndexBy/sortedLastIndexBy.test.js +++ b/test/sortedLastIndexBy/sortedLastIndexBy.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const sortedLastIndexBy = require('./sortedLastIndexBy.js'); -test('Testing sortedLastIndexBy', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof sortedLastIndexBy === 'function', 'sortedLastIndexBy is a Function'); - t.equal(sortedLastIndexBy([{ x: 4 }, { x: 5 }], { x: 4 }, o => o.x), 1, 'Returns the highest index to insert the element without messing up the list order'); - //t.deepEqual(sortedLastIndexBy(args..), 'Expected'); - //t.equal(sortedLastIndexBy(args..), 'Expected'); - //t.false(sortedLastIndexBy(args..), 'Expected'); - //t.throws(sortedLastIndexBy(args..), 'Expected'); - t.end(); +test('sortedLastIndexBy is a Function', () => { + expect(sortedLastIndexBy).toBeInstanceOf(Function); +}); +test('Returns the highest index to insert the element without messing up the list order', () => { + expect(sortedLastIndexBy([{ x: 4 }, { x: 5 }], { x: 4 }, o => o.x)).toBe(1); }); diff --git a/test/speechSynthesis/speechSynthesis.test.js b/test/speechSynthesis/speechSynthesis.test.js index 16d2f891f..9981924c8 100644 --- a/test/speechSynthesis/speechSynthesis.test.js +++ b/test/speechSynthesis/speechSynthesis.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const speechSynthesis = require('./speechSynthesis.js'); -test('Testing speechSynthesis', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof speechSynthesis === 'function', 'speechSynthesis is a Function'); - //t.deepEqual(speechSynthesis(args..), 'Expected'); - //t.equal(speechSynthesis(args..), 'Expected'); - //t.false(speechSynthesis(args..), 'Expected'); - //t.throws(speechSynthesis(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('speechSynthesis is a Function', () => { + expect(speechSynthesis).toBeInstanceOf(Function); +}); diff --git a/test/splitLines/splitLines.test.js b/test/splitLines/splitLines.test.js index 7d03fd581..18a591ba3 100644 --- a/test/splitLines/splitLines.test.js +++ b/test/splitLines/splitLines.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const splitLines = require('./splitLines.js'); -test('Testing splitLines', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof splitLines === 'function', 'splitLines is a Function'); - t.deepEqual(splitLines('This\nis a\nmultiline\nstring.\n'), ['This', 'is a', 'multiline', 'string.' , ''], "Splits a multiline string into an array of lines."); - //t.deepEqual(splitLines(args..), 'Expected'); - //t.equal(splitLines(args..), 'Expected'); - //t.false(splitLines(args..), 'Expected'); - //t.throws(splitLines(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('splitLines is a Function', () => { + expect(splitLines).toBeInstanceOf(Function); +}); +test('Splits a multiline string into an array of lines.', () => { + expect(splitLines('This\nis a\nmultiline\nstring.\n')).toEqual(['This', 'is a', 'multiline', 'string.', '']); +}); diff --git a/test/spreadOver/spreadOver.test.js b/test/spreadOver/spreadOver.test.js index d294b4f52..7f101c1d9 100644 --- a/test/spreadOver/spreadOver.test.js +++ b/test/spreadOver/spreadOver.test.js @@ -1,15 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const spreadOver = require('./spreadOver.js'); -test('Testing spreadOver', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof spreadOver === 'function', 'spreadOver is a Function'); - const arrayMax = spreadOver(Math.max); - t.equal(arrayMax([1, 2, 3]), 3, "Takes a variadic function and returns a closure that accepts an array of arguments to map to the inputs of the function."); - //t.deepEqual(spreadOver(args..), 'Expected'); - //t.equal(spreadOver(args..), 'Expected'); - //t.false(spreadOver(args..), 'Expected'); - //t.throws(spreadOver(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('spreadOver is a Function', () => { + expect(spreadOver).toBeInstanceOf(Function); +}); +const arrayMax = spreadOver(Math.max); +test('Takes a variadic function and returns a closure that accepts an array of arguments to map to the inputs of the function.', () => { + expect(arrayMax([1, 2, 3])).toBe(3); +}); diff --git a/test/stableSort/stableSort.test.js b/test/stableSort/stableSort.test.js index e8cf95496..4c2f3a37b 100644 --- a/test/stableSort/stableSort.test.js +++ b/test/stableSort/stableSort.test.js @@ -1,17 +1,11 @@ -const test = require('tape'); +const expect = require('expect'); const stableSort = require('./stableSort.js'); -test('Testing stableSort', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof stableSort === 'function', 'stableSort is a Function'); - //t.deepEqual(stableSort(args..), 'Expected'); - //t.equal(stableSort(args..), 'Expected'); - //t.false(stableSort(args..), 'Expected'); - //t.throws(stableSort(args..), 'Expected'); - - const arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; - const compare = () => 0; - t.deepEqual(stableSort(arr, compare), arr, 'Array is properly sorted'); - t.end(); +test('stableSort is a Function', () => { + expect(stableSort).toBeInstanceOf(Function); +}); +const arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; +const compare = () => 0; +test('Array is properly sorted', () => { + expect(stableSort(arr, compare)).toEqual(arr); }); diff --git a/test/standardDeviation/standardDeviation.test.js b/test/standardDeviation/standardDeviation.test.js index ad43efb90..0bf680689 100644 --- a/test/standardDeviation/standardDeviation.test.js +++ b/test/standardDeviation/standardDeviation.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const standardDeviation = require('./standardDeviation.js'); -test('Testing standardDeviation', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof standardDeviation === 'function', 'standardDeviation is a Function'); - t.equal(standardDeviation([10, 2, 38, 23, 38, 23, 21]), 13.284434142114991, "Returns the standard deviation of an array of numbers"); - t.equal(standardDeviation([10, 2, 38, 23, 38, 23, 21], true), 12.29899614287479, "Returns the standard deviation of an array of numbers"); - //t.deepEqual(standardDeviation(args..), 'Expected'); - //t.equal(standardDeviation(args..), 'Expected'); - //t.false(standardDeviation(args..), 'Expected'); - //t.throws(standardDeviation(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('standardDeviation is a Function', () => { + expect(standardDeviation).toBeInstanceOf(Function); +}); +test('Returns the standard deviation of an array of numbers', () => { + expect(standardDeviation([10, 2, 38, 23, 38, 23, 21])).toBeCloseTo(13.284434142114991,5); +}); +test('Returns the standard deviation of an array of numbers', () => { + expect(standardDeviation([10, 2, 38, 23, 38, 23, 21], true)).toBeCloseTo(12.29899614287479,5); +}); diff --git a/test/stringPermutations/stringPermutations.test.js b/test/stringPermutations/stringPermutations.test.js index 6b5bb11ad..b97252f6d 100644 --- a/test/stringPermutations/stringPermutations.test.js +++ b/test/stringPermutations/stringPermutations.test.js @@ -1,16 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const stringPermutations = require('./stringPermutations.js'); -test('Testing stringPermutations', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof stringPermutations === 'function', 'stringPermutations is a Function'); - t.deepEqual(stringPermutations('abc'), ['abc','acb','bac','bca','cab','cba'], "Generates all stringPermutations of a string"); - t.deepEqual(stringPermutations('a'), ['a'], "Works for single-letter strings"); - t.deepEqual(stringPermutations(''), [''], "Works for empty strings"); - //t.deepEqual(anagrams(args..), 'Expected'); - //t.equal(anagrams(args..), 'Expected'); - //t.false(anagrams(args..), 'Expected'); - //t.throws(anagrams(args..), 'Expected'); - t.end(); +test('stringPermutations is a Function', () => { + expect(stringPermutations).toBeInstanceOf(Function); +}); +test('Generates all stringPermutations of a string', () => { + expect(stringPermutations('abc')).toEqual(['abc','acb','bac','bca','cab','cba']); +}); +test('Works for single-letter strings', () => { + expect(stringPermutations('a')).toEqual(['a']); +}); +test('Works for empty strings', () => { + expect(stringPermutations('')).toEqual(['']); }); diff --git a/test/stripHTMLTags/stripHTMLTags.test.js b/test/stripHTMLTags/stripHTMLTags.test.js index 7aad3d6fe..fe434e44f 100644 --- a/test/stripHTMLTags/stripHTMLTags.test.js +++ b/test/stripHTMLTags/stripHTMLTags.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const stripHTMLTags = require('./stripHTMLTags.js'); -test('Testing stripHTMLTags', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof stripHTMLTags === 'function', 'stripHTMLTags is a Function'); - t.equals(stripHTMLTags('

lorem ipsum


'), 'lorem ipsum', 'Removes HTML tags'); - //t.deepEqual(stripHTMLTags(args..), 'Expected'); - //t.equal(stripHTMLTags(args..), 'Expected'); - //t.false(stripHTMLTags(args..), 'Expected'); - //t.throws(stripHTMLTags(args..), 'Expected'); - t.end(); +test('stripHTMLTags is a Function', () => { + expect(stripHTMLTags).toBeInstanceOf(Function); +}); +test('Removes HTML tags', () => { + expect(stripHTMLTags('

lorem ipsum


')).toBe('lorem ipsum'); }); diff --git a/test/sum/sum.test.js b/test/sum/sum.test.js index 7abf88f6f..ac94b8891 100644 --- a/test/sum/sum.test.js +++ b/test/sum/sum.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const sum = require('./sum.js'); -test('Testing sum', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof sum === 'function', 'sum is a Function'); - t.equal(sum(...[1, 2, 3, 4]), 10, "Returns the sum of two or more numbers/arrays."); - //t.deepEqual(sum(args..), 'Expected'); - //t.equal(sum(args..), 'Expected'); - //t.false(sum(args..), 'Expected'); - //t.throws(sum(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('sum is a Function', () => { + expect(sum).toBeInstanceOf(Function); +}); +test('Returns the sum of two or more numbers/arrays.', () => { + expect(sum(...[1, 2, 3, 4])).toBe(10); +}); diff --git a/test/sumBy/sumBy.test.js b/test/sumBy/sumBy.test.js index 7d2660dec..07e8c2b17 100644 --- a/test/sumBy/sumBy.test.js +++ b/test/sumBy/sumBy.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const sumBy = require('./sumBy.js'); -test('Testing sumBy', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof sumBy === 'function', 'sumBy is a Function'); - //t.deepEqual(sumBy(args..), 'Expected'); - //t.equal(sumBy(args..), 'Expected'); - //t.false(sumBy(args..), 'Expected'); - //t.throws(sumBy(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('sumBy is a Function', () => { + expect(sumBy).toBeInstanceOf(Function); +}); diff --git a/test/sumPower/sumPower.test.js b/test/sumPower/sumPower.test.js index 44cb6d64f..b655fe974 100644 --- a/test/sumPower/sumPower.test.js +++ b/test/sumPower/sumPower.test.js @@ -1,16 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const sumPower = require('./sumPower.js'); -test('Testing sumPower', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof sumPower === 'function', 'sumPower is a Function'); - t.equal(sumPower(10), 385, "Returns the sum of the powers of all the numbers from start to end"); - t.equal(sumPower(10, 3), 3025, "Returns the sum of the powers of all the numbers from start to end"); - t.equal(sumPower(10, 3, 5), 2925, "Returns the sum of the powers of all the numbers from start to end"); - //t.deepEqual(sumPower(args..), 'Expected'); - //t.equal(sumPower(args..), 'Expected'); - //t.false(sumPower(args..), 'Expected'); - //t.throws(sumPower(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('sumPower is a Function', () => { + expect(sumPower).toBeInstanceOf(Function); +}); +test('Returns the sum of the powers of all the numbers from start to end', () => { + expect(sumPower(10)).toBe(385); +}); +test('Returns the sum of the powers of all the numbers from start to end', () => { + expect(sumPower(10, 3)).toBe(3025); +}); +test('Returns the sum of the powers of all the numbers from start to end', () => { + expect(sumPower(10, 3, 5)).toBe(2925); +}); diff --git a/test/symmetricDifference/symmetricDifference.test.js b/test/symmetricDifference/symmetricDifference.test.js index 1ceeba195..7fc364488 100644 --- a/test/symmetricDifference/symmetricDifference.test.js +++ b/test/symmetricDifference/symmetricDifference.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const symmetricDifference = require('./symmetricDifference.js'); -test('Testing symmetricDifference', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof symmetricDifference === 'function', 'symmetricDifference is a Function'); - t.deepEqual(symmetricDifference([1, 2, 3], [1, 2, 4]), [3, 4], "Returns the symmetric difference between two arrays."); - //t.deepEqual(symmetricDifference(args..), 'Expected'); - //t.equal(symmetricDifference(args..), 'Expected'); - //t.false(symmetricDifference(args..), 'Expected'); - //t.throws(symmetricDifference(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('symmetricDifference is a Function', () => { + expect(symmetricDifference).toBeInstanceOf(Function); +}); +test('Returns the symmetric difference between two arrays.', () => { + expect(symmetricDifference([1, 2, 3], [1, 2, 4])).toEqual([3, 4]); +}); diff --git a/test/symmetricDifferenceBy/symmetricDifferenceBy.test.js b/test/symmetricDifferenceBy/symmetricDifferenceBy.test.js index 4b1fd4e3a..320cd8905 100644 --- a/test/symmetricDifferenceBy/symmetricDifferenceBy.test.js +++ b/test/symmetricDifferenceBy/symmetricDifferenceBy.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const symmetricDifferenceBy = require('./symmetricDifferenceBy.js'); -test('Testing symmetricDifferenceBy', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof symmetricDifferenceBy === 'function', 'symmetricDifferenceBy is a Function'); - t.deepEqual(symmetricDifferenceBy([2.1, 1.2], [2.3, 3.4], Math.floor), [ 1.2, 3.4 ], 'Returns the symmetric difference between two arrays, after applying the provided function to each array element of both'); - //t.deepEqual(symmetricDifferenceBy(args..), 'Expected'); - //t.equal(symmetricDifferenceBy(args..), 'Expected'); - //t.false(symmetricDifferenceBy(args..), 'Expected'); - //t.throws(symmetricDifferenceBy(args..), 'Expected'); - t.end(); +test('symmetricDifferenceBy is a Function', () => { + expect(symmetricDifferenceBy).toBeInstanceOf(Function); +}); +test('Returns the symmetric difference between two arrays, after applying the provided function to each array element of both', () => { + expect(symmetricDifferenceBy([2.1, 1.2], [2.3, 3.4], Math.floor)).toEqual([ 1.2, 3.4 ]); }); diff --git a/test/symmetricDifferenceWith/symmetricDifferenceWith.test.js b/test/symmetricDifferenceWith/symmetricDifferenceWith.test.js index 12267272d..ca4920797 100644 --- a/test/symmetricDifferenceWith/symmetricDifferenceWith.test.js +++ b/test/symmetricDifferenceWith/symmetricDifferenceWith.test.js @@ -1,18 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const symmetricDifferenceWith = require('./symmetricDifferenceWith.js'); -test('Testing symmetricDifferenceWith', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof symmetricDifferenceWith === 'function', 'symmetricDifferenceWith is a Function'); - t.deepEqual(symmetricDifferenceWith( +test('symmetricDifferenceWith is a Function', () => { + expect(symmetricDifferenceWith).toBeInstanceOf(Function); +}); +test('Returns the symmetric difference between two arrays, using a provided function as a comparator', () => { + expect(symmetricDifferenceWith( [1, 1.2, 1.5, 3, 0], [1.9, 3, 0, 3.9], - (a, b) => Math.round(a) === Math.round(b) -), [1, 1.2, 3.9], 'Returns the symmetric difference between two arrays, using a provided function as a comparator'); - //t.deepEqual(symmetricDifferenceWith(args..), 'Expected'); - //t.equal(symmetricDifferenceWith(args..), 'Expected'); - //t.false(symmetricDifferenceWith(args..), 'Expected'); - //t.throws(symmetricDifferenceWith(args..), 'Expected'); - t.end(); + (a, b) => Math.round(a) === Math.round(b))).toEqual([1, 1.2, 3.9]); }); diff --git a/test/tail/tail.test.js b/test/tail/tail.test.js index 6eb499139..e38eb7d37 100644 --- a/test/tail/tail.test.js +++ b/test/tail/tail.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const tail = require('./tail.js'); -test('Testing tail', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof tail === 'function', 'tail is a Function'); - t.deepEqual(tail([1, 2, 3]), [2, 3], "Returns tail"); - t.deepEqual(tail([1]), [1], "Returns tail"); - //t.deepEqual(tail(args..), 'Expected'); - //t.equal(tail(args..), 'Expected'); - //t.false(tail(args..), 'Expected'); - //t.throws(tail(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('tail is a Function', () => { + expect(tail).toBeInstanceOf(Function); +}); +test('Returns tail', () => { + expect(tail([1, 2, 3])).toEqual([2, 3]); +}); +test('Returns tail', () => { + expect(tail([1])).toEqual([1]); +}); diff --git a/test/take/take.test.js b/test/take/take.test.js index 030024725..6621a5176 100644 --- a/test/take/take.test.js +++ b/test/take/take.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const take = require('./take.js'); -test('Testing take', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof take === 'function', 'take is a Function'); - t.deepEqual(take([1, 2, 3], 5), [1, 2, 3], "Returns an array with n elements removed from the beginning."); - t.deepEqual(take([1, 2, 3], 0), [], "Returns an array with n elements removed from the beginning."); - //t.deepEqual(take(args..), 'Expected'); - //t.equal(take(args..), 'Expected'); - //t.false(take(args..), 'Expected'); - //t.throws(take(args..), 'Expected'); - t.end(); +test('take is a Function', () => { + expect(take).toBeInstanceOf(Function); +}); +test('Returns an array with n elements removed from the beginning.', () => { + expect(take([1, 2, 3], 5)).toEqual([1, 2, 3]); +}); +test('Returns an array with n elements removed from the beginning.', () => { + expect(take([1, 2, 3], 0)).toEqual([]); }); diff --git a/test/takeRight/takeRight.test.js b/test/takeRight/takeRight.test.js index a7625862b..b31c99d8d 100644 --- a/test/takeRight/takeRight.test.js +++ b/test/takeRight/takeRight.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const takeRight = require('./takeRight.js'); -test('Testing takeRight', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof takeRight === 'function', 'takeRight is a Function'); - t.deepEqual(takeRight([1, 2, 3], 2), [2, 3], "Returns an array with n elements removed from the end"); - t.deepEqual(takeRight([1, 2, 3]), [3], "Returns an array with n elements removed from the end"); - //t.deepEqual(takeRight(args..), 'Expected'); - //t.equal(takeRight(args..), 'Expected'); - //t.false(takeRight(args..), 'Expected'); - //t.throws(takeRight(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('takeRight is a Function', () => { + expect(takeRight).toBeInstanceOf(Function); +}); +test('Returns an array with n elements removed from the end', () => { + expect(takeRight([1, 2, 3], 2)).toEqual([2, 3]); +}); +test('Returns an array with n elements removed from the end', () => { + expect(takeRight([1, 2, 3])).toEqual([3]); +}); diff --git a/test/takeRightWhile/takeRightWhile.test.js b/test/takeRightWhile/takeRightWhile.test.js index c841d410d..9730677d9 100644 --- a/test/takeRightWhile/takeRightWhile.test.js +++ b/test/takeRightWhile/takeRightWhile.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const takeRightWhile = require('./takeRightWhile.js'); -test('Testing takeRightWhile', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof takeRightWhile === 'function', 'takeRightWhile is a Function'); - t.deepEqual(takeRightWhile([1, 2, 3, 4], n => n < 3), [3, 4], 'Removes elements until the function returns true'); - //t.deepEqual(takeRightWhile(args..), 'Expected'); - //t.equal(takeRightWhile(args..), 'Expected'); - //t.false(takeRightWhile(args..), 'Expected'); - //t.throws(takeRightWhile(args..), 'Expected'); - t.end(); +test('takeRightWhile is a Function', () => { + expect(takeRightWhile).toBeInstanceOf(Function); +}); +test('Removes elements until the function returns true', () => { + expect(takeRightWhile([1, 2, 3, 4], n => n < 3)).toEqual([3, 4]); }); diff --git a/test/takeWhile/takeWhile.test.js b/test/takeWhile/takeWhile.test.js index 09f5d5cb7..bdc14c586 100644 --- a/test/takeWhile/takeWhile.test.js +++ b/test/takeWhile/takeWhile.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const takeWhile = require('./takeWhile.js'); -test('Testing takeWhile', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof takeWhile === 'function', 'takeWhile is a Function'); - t.deepEqual(takeWhile([1, 2, 3, 4], n => n >= 3), [1, 2], 'Removes elements until the function returns true'); - //t.deepEqual(takeWhile(args..), 'Expected'); - //t.equal(takeWhile(args..), 'Expected'); - //t.false(takeWhile(args..), 'Expected'); - //t.throws(takeWhile(args..), 'Expected'); - t.end(); +test('takeWhile is a Function', () => { + expect(takeWhile).toBeInstanceOf(Function); +}); +test('Removes elements until the function returns true', () => { + expect(takeWhile([1, 2, 3, 4], n => n >= 3)).toEqual([1, 2]); }); diff --git a/test/testlog b/test/testlog index 790dd2119..c17ca9b95 100644 --- a/test/testlog +++ b/test/testlog @@ -1,2054 +1,1994 @@ -Test log for: Sun Jun 17 2018 21:26:15 GMT+0000 (Coordinated Universal Time) -> 30-seconds-of-code@0.0.3 test /home/travis/build/Chalarangelo/30-seconds-of-code -> tape test/**/*.test.js | tap-spec +# Starting... +# 331 test suites found. - Testing JSONToDate +# PASS test\toCurrency\toCurrency.test.js - ✔ JSONToDate is a Function +ok 1 — toCurrency is a Function +ok 2 — currency: Euro | currencyLangFormat: Local +ok 3 — currency: US Dollar | currencyLangFormat: English (United States) +ok 4 — currency: Japanese Yen | currencyLangFormat: Local + +# PASS test\functionName\functionName.test.js + +ok 5 — functionName is a Function +ok 6 — Works for native functions +ok 7 — Works for functions +ok 8 — Works for arrow functions + +# PASS test\unzip\unzip.test.js + +ok 9 — unzip is a Function +ok 10 — unzip([['a', 1, true], ['b', 2, false]]) equals [['a','b'], [1, 2], [true, false]] +ok 11 — unzip([['a', 1, true], ['b', 2]]) equals [['a','b'], [1, 2], [true]] - Testing JSONToFile +# PASS test\uniqueElements\uniqueElements.test.js - ✔ JSONToFile is a Function - ✔ Tested on 09/02/2018 by @chalarangelo +ok 12 — uniqueElements is a Function +ok 13 — uniqueElements([1, 2, 2, 3, 4, 4, 5]) returns [1,2,3,4,5] +ok 14 — uniqueElements([1, 23, 53]) returns [1, 23, 53] +ok 15 — uniqueElements([true, 0, 1, false, false, undefined, null, '']) returns [true, 0, 1, false, false, undefined, null, ''] +ok 16 — uniqueElements() returns [] +ok 17 — uniqueElements(null) returns [] +ok 18 — uniqueElements(undefined) returns [] +ok 19 — uniqueElements('strt') returns ['s', 't', 'r'] +ok 20 — uniqueElements(1, 1, 2543, 534, 5) throws an error +ok 21 — uniqueElements({}) throws an error +ok 22 — uniqueElements(true) throws an error +ok 23 — uniqueElements(false) throws an error +ok 24 — uniqueElements([true, 0, 1, false, false, undefined, null]) takes less than 2s to run - Testing RGBToHex +# PASS test\chunk\chunk.test.js - ✔ RGBToHex is a Function - ✔ Converts the values of RGB components to a color code. +ok 25 — chunk is a Function +ok 26 — chunk([1, 2, 3, 4, 5], 2) returns [[1,2],[3,4],[5]] +ok 27 — chunk([]) returns [] +ok 28 — chunk(123) returns [] +ok 29 — chunk({ a: 123}) returns [] +ok 30 — chunk(string, 2) returns [ st, ri, ng ] +ok 31 — chunk() throws an error +ok 32 — chunk(undefined) throws an error +ok 33 — chunk(null) throws an error +ok 34 — chunk(This is a string, 2) takes less than 2s to run - Testing URLJoin +# PASS test\similarity\similarity.test.js + +ok 35 — similarity is a Function +ok 36 — Returns an array of elements that appear in both arrays. - ✔ URLJoin is a Function - ✔ Returns proper URL - ✔ Returns proper URL +# PASS test\inRange\inRange.test.js - Testing UUIDGeneratorBrowser +ok 37 — inRange is a Function +ok 38 — The given number falls within the given range +ok 39 — The given number falls within the given range +ok 40 — The given number does not falls within the given range +ok 41 — The given number does not falls within the given range + +# PASS test\matches\matches.test.js + +ok 42 — matches is a Function +ok 43 — Matches returns true for two similar objects +ok 44 — Matches returns false for two non-similar objects + +# PASS test\gcd\gcd.test.js + +ok 45 — gcd is a Function +ok 46 — Calculates the greatest common divisor between two or more numbers/arrays +ok 47 — Calculates the greatest common divisor between two or more numbers/arrays + +# PASS test\everyNth\everyNth.test.js + +ok 48 — everyNth is a Function +ok 49 — Returns every nth element in an array + +# PASS test\isSorted\isSorted.test.js + +ok 50 — isSorted is a Function +ok 51 — Array is sorted in ascending order +ok 52 — Array is sorted in ascending order +ok 53 — Array is sorted in ascending order +ok 54 — Array is sorted in ascending order +ok 55 — Array is sorted in descending order +ok 56 — Array is sorted in descending order +ok 57 — Array is sorted in descending order +ok 58 — Array is sorted in descending order +ok 59 — Array is empty +ok 60 — Array is not sorted, direction changed in array +ok 61 — Array is not sorted, direction changed in array + +# PASS test\union\union.test.js + +ok 62 — union is a Function +ok 63 — union([1, 2, 3], [4, 3, 2]) returns [1, 2, 3, 4] +ok 64 — union('str', 'asd') returns [ 's', 't', 'r', 'a', 'd' ] +ok 65 — union([[], {}], [1, 2, 3]) returns [[], {}, 1, 2, 3] +ok 66 — union([], []) returns [] +ok 67 — union() throws an error +ok 68 — union(true, 'str') throws an error +ok 69 — union('false', true) throws an error +ok 70 — union((123, {}) throws an error +ok 71 — union([], {}) throws an error +ok 72 — union(undefined, null) throws an error +ok 73 — union([1, 2, 3], [4, 3, 2]) takes less than 2s to run + +# PASS test\luhnCheck\luhnCheck.test.js + +ok 74 — luhnCheck is a Function +ok 75 — validates identification number +ok 76 — validates identification number +ok 77 — validates identification number + +# PASS test\nodeListToArray\nodeListToArray.test.js + +ok 78 — nodeListToArray is a Function + +# PASS test\overArgs\overArgs.test.js + +ok 79 — overArgs is a Function +ok 80 — Invokes the provided function with its arguments transformed + +# PASS test\sortedIndex\sortedIndex.test.js + +ok 81 — sortedIndex is a Function +ok 82 — Returns the lowest index at which value should be inserted into array in order to maintain its sort order. +ok 83 — Returns the lowest index at which value should be inserted into array in order to maintain its sort order. + +# PASS test\isPrimitive\isPrimitive.test.js + +ok 84 — isPrimitive is a Function +ok 85 — isPrimitive(null) is primitive +ok 86 — isPrimitive(undefined) is primitive +ok 87 — isPrimitive(string) is primitive +ok 88 — isPrimitive(true) is primitive +ok 89 — isPrimitive(50) is primitive +ok 90 — isPrimitive('Hello') is primitive +ok 91 — isPrimitive(false) is primitive +ok 92 — isPrimitive(Symbol()) is primitive +ok 93 — isPrimitive([1, 2, 3]) is not primitive +ok 94 — isPrimitive({ a: 123 }) is not primitive +ok 95 — isPrimitive({ a: 123 }) takes less than 2s to run + +# PASS test\isBoolean\isBoolean.test.js + +ok 96 — isBoolean is a Function +ok 97 — passed value is not a boolean +ok 98 — passed value is not a boolean + +# PASS test\without\without.test.js + +ok 99 — without is a Function +ok 100 — without([2, 1, 2, 3], 1, 2) returns [3] +ok 101 — without([]) returns [] +ok 102 — without([3, 1, true, '3', true], '3', true) returns [3, 1] +ok 103 — without('string'.split(''), 's', 't', 'g') returns ['r', 'i', 'n'] +ok 104 — without() throws an error +ok 105 — without(null) throws an error +ok 106 — without(undefined) throws an error +ok 107 — without(123) throws an error +ok 108 — without({}) throws an error + +# PASS test\validateNumber\validateNumber.test.js + +ok 109 — validateNumber is a Function +ok 110 — validateNumber(9) returns true +ok 111 — validateNumber(234asd.slice(0, 2)) returns true +ok 112 — validateNumber(1232) returns true +ok 113 — validateNumber(1232 + 13423) returns true +ok 114 — validateNumber(1232 * 2342 * 123) returns true +ok 115 — validateNumber(1232.23423536) returns true +ok 116 — validateNumber(234asd) returns false +ok 117 — validateNumber(e234d) returns false +ok 118 — validateNumber(false) returns false +ok 119 — validateNumber(true) returns false +ok 120 — validateNumber(null) returns false +ok 121 — validateNumber(123 * asd) returns false + +# PASS test\zipObject\zipObject.test.js + +ok 122 — zipObject is a Function +ok 123 — zipObject([a, b, c], [1, 2]) returns {a: 1, b: 2, c: undefined} +ok 124 — zipObject([a, b], [1, 2, 3]) returns {a: 1, b: 2} +ok 125 — zipObject([a, b, c], string) returns { a: s, b: t, c: r } +ok 126 — zipObject([a], string) returns { a: s } +ok 127 — zipObject() throws an error +ok 128 — zipObject((['string'], null) throws an error +ok 129 — zipObject(null, [1]) throws an error +ok 130 — zipObject('string') throws an error +ok 131 — zipObject('test', 'string') throws an error + +# PASS test\memoize\memoize.test.js + +ok 132 — memoize is a Function +ok 133 — Function works properly +ok 134 — Function works properly +ok 135 — Cache stores values + +# PASS test\toggleClass\toggleClass.test.js + +ok 136 — toggleClass is a Function + +# PASS test\bind\bind.test.js + +ok 137 — bind is a Function +ok 138 — Binds to an object context + +# PASS test\promisify\promisify.test.js + +ok 139 — promisify is a Function +ok 140 — Returns a promise +ok 141 — Runs the function provided + +# PASS test\reverseString\reverseString.test.js + +ok 142 — reverseString is a Function +ok 143 — Reverses a string. + +# PASS test\yesNo\yesNo.test.js + +ok 144 — yesNo is a Function +ok 145 — yesNo(Y) returns true +ok 146 — yesNo(yes) returns true +ok 147 — yesNo(foo, true) returns true +ok 148 — yesNo(No) returns false +ok 149 — yesNo() returns false +ok 150 — yesNo(null) returns false +ok 151 — yesNo(undefined) returns false +ok 152 — yesNo([123, null]) returns false +ok 153 — yesNo([Yes, No]) returns false +ok 154 — yesNo({ 2: Yes }) returns false +ok 155 — yesNo([Yes, No], true) returns true +ok 156 — yesNo({ 2: Yes }, true) returns true + +# PASS test\arrayToHtmlList\arrayToHtmlList.test.js + +ok 157 — arrayToHtmlList is a Function + +# PASS test\toSafeInteger\toSafeInteger.test.js + +ok 158 — toSafeInteger is a Function +ok 159 — Number(toSafeInteger(3.2)) is a number +ok 160 — Converts a value to a safe integer +ok 161 — toSafeInteger('4.2') returns 4 +ok 162 — toSafeInteger(4.6) returns 5 +ok 163 — toSafeInteger([]) returns 0 +ok 164 — isNaN(toSafeInteger([1.5, 3124])) is true +ok 165 — isNaN(toSafeInteger('string')) is true +ok 166 — isNaN(toSafeInteger({})) is true +ok 167 — isNaN(toSafeInteger()) is true +ok 168 — toSafeInteger(Infinity) returns 9007199254740991 +ok 169 — toSafeInteger(3.2) takes less than 2s to run + +# PASS test\reduceWhich\reduceWhich.test.js + +ok 170 — reduceWhich is a Function +ok 171 — Returns the minimum of an array +ok 172 — Returns the maximum of an array +ok 173 — Returns the object with the minimum specified value in an array + +# PASS test\elo\elo.test.js + +ok 174 — elo is a Function +ok 175 — Standard 1v1s +ok 176 — Standard 1v1s +ok 177 — 4 player FFA, all same rank + +# PASS test\toKebabCase\toKebabCase.test.js + +ok 178 — toKebabCase is a Function +ok 179 — toKebabCase('camelCase') returns camel-case +ok 180 — toKebabCase('some text') returns some-text +ok 181 — toKebabCase('some-mixed-string With spaces-underscores-and-hyphens') returns some-mixed-string-with-spaces-underscores-and-hyphens +ok 182 — toKebabCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML') returns i-am-listening-to-fm-while-loading-different-url-on-my-browser-and-also-editing-some-xml-and-html +ok 183 — toKebabCase() returns undefined +ok 184 — toKebabCase([]) throws an erro +ok 185 — toKebabCase({}) throws an erro +ok 186 — toKebabCase(123) throws an erro +ok 187 — toKebabCase(IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML) takes less than 2s to run + +# PASS test\round\round.test.js + +ok 188 — round is a Function +ok 189 — round(1.005, 2) returns 1.01 +ok 190 — round(123.3423345345345345344, 11) returns 123.34233453453 +ok 191 — round(3.342, 11) returns 3.342 +ok 192 — round(1.005) returns 1 +ok 193 — round([1.005, 2]) returns NaN +ok 194 — round(string) returns NaN +ok 195 — round() returns NaN +ok 196 — round(132, 413, 4134) returns NaN +ok 197 — round({a: 132}, 413) returns NaN +ok 198 — round(123.3423345345345345344, 11) takes less than 2s to run + +# PASS test\offset\offset.test.js + +ok 199 — offset is a Function +ok 200 — Offset of 0 returns the same array. +ok 201 — Offset > 0 returns the offsetted array. +ok 202 — Offset < 0 returns the reverse offsetted array. +ok 203 — Offset greater than the length of the array returns the same array. +ok 204 — Offset less than the negative length of the array returns the same array. +ok 205 — Offsetting empty array returns an empty array. + +# PASS test\times\times.test.js + +ok 206 — times is a Function +ok 207 — Runs a function the specified amount of times + +# PASS test\difference\difference.test.js + +ok 208 — difference is a Function +ok 209 — Returns the difference between two arrays + +# PASS test\head\head.test.js + +ok 210 — head is a Function +ok 211 — head({ a: 1234}) returns undefined +ok 212 — head([1, 2, 3]) returns 1 +ok 213 — head({ 0: false}) returns false +ok 214 — head(String) returns S +ok 215 — head(null) throws an Error +ok 216 — head(undefined) throws an Error +ok 217 — head() throws an Error +ok 218 — head([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run + +# PASS test\countBy\countBy.test.js + +ok 219 — countBy is a Function +ok 220 — Works for functions +ok 221 — Works for property names + +# PASS test\quickSort\quickSort.test.js + +ok 222 — quickSort is a Function +ok 223 — quickSort([5, 6, 4, 3, 1, 2]) returns [1, 2, 3, 4, 5, 6] +ok 224 — quickSort([-1, 0, -2]) returns [-2, -1, 0] +ok 225 — quickSort() throws an error +ok 226 — quickSort(123) throws an error +ok 227 — quickSort({ 234: string}) throws an error +ok 228 — quickSort(null) throws an error +ok 229 — quickSort(undefined) throws an error +ok 230 — quickSort([11, 1, 324, 23232, -1, 53, 2, 524, 32, 13, 156, 133, 62, 12, 4]) takes less than 2s to run + +# PASS test\nthArg\nthArg.test.js + +ok 231 — nthArg is a Function +ok 232 — Returns the nth argument +ok 233 — Returns undefined if arguments too few +ok 234 — Works for negative values + +# PASS test\castArray\castArray.test.js + +ok 235 — castArray is a Function +ok 236 — Works for single values +ok 237 — Works for arrays with one value +ok 238 — Works for arrays with multiple value +ok 239 — Works for strings +ok 240 — Works for objects + +# PASS test\minN\minN.test.js + +ok 241 — minN is a Function +ok 242 — Returns the n minimum elements from the provided array +ok 243 — Returns the n minimum elements from the provided array + +# PASS test\isEmpty\isEmpty.test.js + +ok 244 — isEmpty is a Function +ok 245 — Returns true for empty Map +ok 246 — Returns true for empty Set +ok 247 — Returns true for empty array +ok 248 — Returns true for empty object +ok 249 — Returns true for empty string +ok 250 — Returns false for non-empty array +ok 251 — Returns false for non-empty object +ok 252 — Returns false for non-empty string +ok 253 — Returns true - type is not considered a collection +ok 254 — Returns true - type is not considered a collection - ✔ UUIDGeneratorBrowser is a Function - ✔ Tested 09/02/2018 by @chalarangelo +# PASS test\mapObject\mapObject.test.js - Testing UUIDGeneratorNode +ok 255 — mapObject is a Function +ok 256 — mapObject([1, 2, 3], a => a * a) returns { 1: 1, 2: 4, 3: 9 } +ok 257 — mapObject([1, 2, 3, 4], (a, b) => b - a) returns { 1: -1, 2: -1, 3: -1, 4: -1 } +ok 258 — mapObject([1, 2, 3, 4], (a, b) => a - b) returns { 1: 1, 2: 1, 3: 1, 4: 1 } - ✔ UUIDGeneratorNode is a Function - ✔ Contains dashes in the proper places - ✔ Only contains hexadecimal digits +# PASS test\prettyBytes\prettyBytes.test.js - Testing all +ok 259 — prettyBytes is a Function +ok 260 — Converts a number in bytes to a human-readable string. +ok 261 — Converts a number in bytes to a human-readable string. +ok 262 — Converts a number in bytes to a human-readable string. - ✔ all is a Function - ✔ Returns true for arrays with no falsey values - ✔ Returns false for arrays with 0 - ✔ Returns false for arrays with NaN - ✔ Returns false for arrays with undefined - ✔ Returns false for arrays with null - ✔ Returns false for arrays with empty strings - ✔ Returns true with predicate function - ✔ Returns false with a predicate function +# PASS test\atob\atob.test.js - Testing any +ok 263 — atob is a Function +ok 264 — atob("Zm9vYmFy") equals "foobar" +ok 265 — atob("Z") returns "" - ✔ any is a Function - ✔ Returns true for arrays with at least one truthy value - ✔ Returns false for arrays with no truthy values - ✔ Returns false for arrays with no truthy values - ✔ Returns true with predicate function - ✔ Returns false with a predicate function +# PASS test\cloneRegExp\cloneRegExp.test.js - Testing approximatelyEqual +ok 266 — cloneRegExp is a Function +ok 267 — Clones regular expressions properly - ✔ approximatelyEqual is a Function - ✔ Works for PI / 2 - ✔ Works for 0.1 + 0.2 === 0.3 - ✔ Works for exactly equal values - ✔ Works for a custom epsilon +# PASS test\toSnakeCase\toSnakeCase.test.js - Testing arrayToHtmlList +ok 268 — toSnakeCase is a Function +ok 269 — toSnakeCase('camelCase') returns camel_case +ok 270 — toSnakeCase('some text') returns some_text +ok 271 — toSnakeCase('some-mixed_string With spaces_underscores-and-hyphens') returns some_mixed_string_with_spaces_underscores_and_hyphens +ok 272 — toSnakeCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML') returns i_am_listening_to_fm_while_loading_different_url_on_my_browser_and_also_editing_some_xml_and_html +ok 273 — toSnakeCase() returns undefined +ok 274 — toSnakeCase([]) throws an error +ok 275 — toSnakeCase({}) throws an error +ok 276 — toSnakeCase(123) throws an error +ok 277 — toSnakeCase(IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML) takes less than 2s to run - ✔ arrayToHtmlList is a Function - ✔ Tested by @chalarangelo on 16/02/2018 +# PASS test\debounce\debounce.test.js - Testing ary +ok 278 — debounce is a Function +ok 279 — Works as expected - ✔ ary is a Function - ✔ Discards arguments with index >=n +# PASS test\orderBy\orderBy.test.js - Testing atob +ok 280 — orderBy is a Function +ok 281 — Returns a sorted array of objects ordered by properties and orders. +ok 282 — Returns a sorted array of objects ordered by properties and orders. - ✔ atob is a Function - ✔ atob("Zm9vYmFy") equals "foobar" - ✔ atob("Z") returns "" +# PASS test\toCamelCase\toCamelCase.test.js - Testing attempt +ok 283 — toCamelCase is a Function +ok 284 — toCamelCase('some_database_field_name') returns someDatabaseFieldName +ok 285 — toCamelCase('Some label that needs to be camelized') returns someLabelThatNeedsToBeCamelized +ok 286 — toCamelCase('some-javascript-property') return someJavascriptProperty +ok 287 — toCamelCase('some-mixed_string with spaces_underscores-and-hyphens') returns someMixedStringWithSpacesUnderscoresAndHyphens +ok 288 — toCamelCase() throws a error +ok 289 — toCamelCase([]) throws a error +ok 290 — toCamelCase({}) throws a error +ok 291 — toCamelCase(123) throws a error +ok 292 — toCamelCase(some-mixed_string with spaces_underscores-and-hyphens) takes less than 2s to run - ✔ attempt is a Function - ✔ Returns a value - ✔ Returns an error +# PASS test\isArray\isArray.test.js - Testing average +ok 293 — isArray is a Function +ok 294 — passed value is an array +ok 295 — passed value is not an array - ✔ average is a Function - ✔ average(true) returns 0 - ✔ average(false) returns 1 - ✔ average(9, 1) returns 5 - ✔ average(153, 44, 55, 64, 71, 1122, 322774, 2232, 23423, 234, 3631) returns 32163.909090909092 - ✔ average(1, 2, 3) returns 2 - ✔ average(null) returns 0 - ✔ average(1, 2, 3) returns NaN - ✔ average(String) returns NaN - ✔ average({ a: 123}) returns NaN - ✔ average([undefined, 0, string]) returns NaN - ✔ average([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run +# PASS test\isArrayBuffer\isArrayBuffer.test.js - Testing averageBy +ok 296 — isArrayBuffer is a Function - ✔ averageBy is a Function - ✔ Produces the right result with a function - ✔ Produces the right result with a property name +# PASS test\isString\isString.test.js - Testing bifurcate +ok 297 — isString is a Function +ok 298 — foo is a string +ok 299 — "10" is a string +ok 300 — Empty string is a string +ok 301 — 10 is not a string +ok 302 — true is not string - ✔ bifurcate is a Function - ✔ Splits the collection into two groups +# PASS test\pick\pick.test.js - Testing bifurcateBy +ok 303 — pick is a Function +ok 304 — Picks the key-value pairs corresponding to the given keys from an object. - ✔ bifurcateBy is a Function - ✔ Splits the collection into two groups +# PASS test\isWeakMap\isWeakMap.test.js - Testing binarySearch +ok 305 — isWeakMap is a Function - ✔ binarySearch is a Function - ✔ Finds item in array - ✔ Returns -1 when not found - ✔ Works with empty arrays - ✔ Works for one element arrays +# PASS test\httpsRedirect\httpsRedirect.test.js - Testing bind +ok 306 — httpsRedirect is a Function - ✔ bind is a Function - ✔ Binds to an object context +# PASS test\toOrdinalSuffix\toOrdinalSuffix.test.js - Testing bindAll +ok 307 — toOrdinalSuffix is a Function +ok 308 — Adds an ordinal suffix to a number +ok 309 — Adds an ordinal suffix to a number +ok 310 — Adds an ordinal suffix to a number +ok 311 — Adds an ordinal suffix to a number - ✔ bindAll is a Function - ✔ Binds to an object context +# PASS test\sortedLastIndexBy\sortedLastIndexBy.test.js - Testing bindKey +ok 312 — sortedLastIndexBy is a Function +ok 313 — Returns the highest index to insert the element without messing up the list order - ✔ bindKey is a Function - ✔ Binds function to an object context +# PASS test\runPromisesInSeries\runPromisesInSeries.test.js - Testing binomialCoefficient +ok 314 — runPromisesInSeries is a Function +ok 315 — Runs promises in series - ✔ binomialCoefficient is a Function - ✔ Returns the appropriate value - ✔ Returns the appropriate value - ✔ Returns the appropriate value - ✔ Returns NaN - ✔ Returns NaN +# PASS test\sampleSize\sampleSize.test.js - Testing bottomVisible +ok 316 — sampleSize is a Function +ok 317 — Returns a single element without n specified +ok 318 — Returns a random sample of specified size from an array +ok 319 — Returns all elements in an array if n >= length +ok 320 — Returns an empty array if original array is empty +ok 321 — Returns an empty array if n = 0 - ✔ bottomVisible is a Function - ✔ Tested on 09/02/2018 by @chalarangelo +# PASS test\recordAnimationFrames\recordAnimationFrames.test.js - Testing btoa +ok 322 — recordAnimationFrames is a Function - ✔ btoa is a Function - ✔ btoa("foobar") equals "Zm9vYmFy" +# PASS test\isAbsoluteURL\isAbsoluteURL.test.js - Testing byteSize +ok 323 — isAbsoluteURL is a Function +ok 324 — Given string is an absolute URL +ok 325 — Given string is an absolute URL +ok 326 — Given string is not an absolute URL - ✔ byteSize is a Function - ✔ Works for a single letter - ✔ Works for a common string - ✔ Works for emoji +# PASS test\timeTaken\timeTaken.test.js - Testing call +ok 327 — timeTaken is a Function - ✔ call is a Function - ✔ Calls function on given object +# PASS test\tomorrow\tomorrow.test.js - Testing capitalize +ok 328 — tomorrow is a Function +ok 329 — Returns the correct year +ok 330 — Returns the correct month +ok 331 — Returns the correct date - ✔ capitalize is a Function - ✔ Capitalizes the first letter of a string - ✔ Capitalizes the first letter of a string - ✔ Works with characters - ✔ Works with single character words +# PASS test\pullAtIndex\pullAtIndex.test.js - Testing capitalizeEveryWord +ok 332 — pullAtIndex is a Function +ok 333 — Pulls the given values +ok 334 — Pulls the given values - ✔ capitalizeEveryWord is a Function - ✔ Capitalizes the first letter of every word in a string - ✔ Works with characters - ✔ Works with one word string +# PASS test\words\words.test.js - Testing castArray +ok 335 — words is a Function +ok 336 — words('I love javaScript!!') returns [I, love, javaScript] +ok 337 — words('python, javaScript & coffee') returns [python, javaScript, coffee] +ok 338 — words(I love javaScript!!) returns an array +ok 339 — words() throws an error +ok 340 — words(null) throws an error +ok 341 — words(undefined) throws an error +ok 342 — words({}) throws an error +ok 343 — words([]) throws an error +ok 344 — words(1234) throws an error - ✔ castArray is a Function - ✔ Works for single values - ✔ Works for arrays with one value - ✔ Works for arrays with multiple value - ✔ Works for strings - ✔ Works for objects +# PASS test\isNumber\isNumber.test.js - Testing chainAsync +ok 345 — isNumber is a Function +ok 346 — passed argument is a number +ok 347 — passed argument is not a number - ✔ chainAsync is a Function - ✔ Calls all functions in an array +# PASS test\median\median.test.js - Testing chunk +ok 348 — median is a Function +ok 349 — Returns the median of an array of numbers +ok 350 — Returns the median of an array of numbers - ✔ chunk is a Function - ✔ chunk([1, 2, 3, 4, 5], 2) returns [[1,2],[3,4],[5]] - ✔ chunk([]) returns [] - ✔ chunk(123) returns [] - ✔ chunk({ a: 123}) returns [] - ✔ chunk(string, 2) returns [ st, ri, ng ] - ✔ chunk() throws an error - ✔ chunk(undefined) throws an error - ✔ chunk(null) throws an error - ✔ chunk(This is a string, 2) takes less than 2s to run +# PASS test\bindKey\bindKey.test.js - Testing clampNumber +ok 351 — bindKey is a Function +ok 352 — Binds function to an object context - ✔ clampNumber is a Function - ✔ Clamps num within the inclusive range specified by the boundary values a and b +# PASS test\cleanObj\cleanObj.test.js - Testing cleanObj +ok 353 — cleanObj is a Function +ok 354 — Removes any properties except the ones specified from a JSON object - ✔ cleanObj is a Function - ✔ Removes any properties except the ones specified from a JSON object +# PASS test\forOwnRight\forOwnRight.test.js - Testing cloneRegExp +ok 355 — forOwnRight is a Function +ok 356 — Iterates over an element's key-value pairs in reverse - ✔ cloneRegExp is a Function - ✔ Clones regular expressions properly +# PASS test\primes\primes.test.js - Testing coalesce +ok 357 — primes is a Function +ok 358 — Generates primes up to a given number, using the Sieve of Eratosthenes. - ✔ coalesce is a Function - ✔ Returns the first non-null/undefined argument +# PASS test\pad\pad.test.js - Testing coalesceFactory +ok 359 — pad is a Function +ok 360 — cat is padded on both sides +ok 361 — length of string is 8 +ok 362 — pads 42 with "0" +ok 363 — does not truncates if string exceeds length - ✔ coalesceFactory is a Function - ✔ Returns a customized coalesce function +# PASS test\xProd\xProd.test.js - Testing collatz +ok 364 — xProd is a Function +ok 365 — xProd([1, 2], ['a', 'b']) returns [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] - ✔ collatz is a Function - ✔ When n is even, divide by 2 - ✔ When n is odd, times by 3 and add 1 - ✔ Eventually reaches 1 +# PASS test\isObjectLike\isObjectLike.test.js - Testing collectInto +ok 366 — isObjectLike is a Function +ok 367 — Returns true for an object +ok 368 — Returns true for an array +ok 369 — Returns false for a function +ok 370 — Returns false for null - ✔ collectInto is a Function +# PASS test\partition\partition.test.js - Testing colorize +ok 371 — partition is a Function +ok 372 — Groups the elements into two arrays, depending on the provided function's truthiness for each element. - ✔ colorize is a Function - ✔ Tested on 09/02/2018 by @chalarangelo +# PASS test\all\all.test.js - Testing compact +ok 373 — all is a Function +ok 374 — Returns true for arrays with no falsey values +ok 375 — Returns false for arrays with 0 +ok 376 — Returns false for arrays with NaN +ok 377 — Returns false for arrays with undefined +ok 378 — Returns false for arrays with null +ok 379 — Returns false for arrays with empty strings +ok 380 — Returns true with predicate function +ok 381 — Returns false with a predicate function - ✔ compact is a Function - ✔ Removes falsey values from an array +# PASS test\fromCamelCase\fromCamelCase.test.js - Testing compose +ok 382 — fromCamelCase is a Function +ok 383 — Converts a string from camelcase +ok 384 — Converts a string from camelcase +ok 385 — Converts a string from camelcase - ✔ compose is a Function - ✔ Performs right-to-left function composition +# PASS test\splitLines\splitLines.test.js - Testing composeRight +ok 386 — splitLines is a Function +ok 387 — Splits a multiline string into an array of lines. - ✔ composeRight is a Function - ✔ Performs left-to-right function composition +# PASS test\factorial\factorial.test.js - Testing converge +ok 388 — factorial is a Function +ok 389 — Calculates the factorial of 720 +ok 390 — Calculates the factorial of 0 +ok 391 — Calculates the factorial of 1 +ok 392 — Calculates the factorial of 4 +ok 393 — Calculates the factorial of 10 - ✔ converge is a Function - ✔ Produces the average of the array - ✔ Produces the strange concatenation +# PASS test\forOwn\forOwn.test.js - Testing copyToClipboard +ok 394 — forOwn is a Function +ok 395 — Iterates over an element's key-value pairs - ✔ copyToClipboard is a Function - ✔ Tested on 09/02/2018 by @chalarangelo +# PASS test\take\take.test.js - Testing countBy +ok 396 — take is a Function +ok 397 — Returns an array with n elements removed from the beginning. +ok 398 — Returns an array with n elements removed from the beginning. - ✔ countBy is a Function - ✔ Works for functions - ✔ Works for property names +# PASS test\hashNode\hashNode.test.js - Testing countOccurrences +ok 399 — hashNode is a Function +ok 400 — Produces the appropriate hash - ✔ countOccurrences is a Function - ✔ Counts the occurrences of a value in an array +# PASS test\colorize\colorize.test.js - Testing countVowels +ok 401 — colorize is a Function - ✔ countVowels is a Function +# PASS test\unfold\unfold.test.js - Testing counter +ok 402 — unfold is a Function +ok 403 — Works with a given function, producing an array - ✔ counter is a Function +# PASS test\stripHTMLTags\stripHTMLTags.test.js - Testing createElement +ok 404 — stripHTMLTags is a Function +ok 405 — Removes HTML tags - ✔ createElement is a Function - ✔ Tested by @chalarangelo on 16/02/2018 +# PASS test\longestItem\longestItem.test.js - Testing createEventHub +ok 406 — longestItem is a Function +ok 407 — Returns the longest object - ✔ createEventHub is a Function - ✔ Tested by @chalarangelo on 16/02/2018 +# PASS test\average\average.test.js - Testing currentURL +ok 408 — average is a Function +ok 409 — average(true) returns 0 +ok 410 — average(false) returns 1 +ok 411 — average(9, 1) returns 5 +ok 412 — average(153, 44, 55, 64, 71, 1122, 322774, 2232, 23423, 234, 3631) returns 32163.909090909092 +ok 413 — average(1, 2, 3) returns 2 +ok 414 — average(null) returns 0 +ok 415 — average(1, 2, 3) returns NaN +ok 416 — average(String) returns NaN +ok 417 — average({ a: 123}) returns NaN +ok 418 — average([undefined, 0, string]) returns NaN +ok 419 — average([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run - ✔ currentURL is a Function - ✔ Tested by @chalarangelo on 16/02/2018 +# PASS test\randomIntegerInRange\randomIntegerInRange.test.js - Testing curry +ok 420 — randomIntegerInRange is a Function +ok 421 — The returned value is an integer +ok 422 — The returned value lies between provided lowerLimit and upperLimit (both inclusive). - ✔ curry is a Function - ✔ curries a Math.pow - ✔ curries a Math.min +# PASS test\any\any.test.js - Testing debounce +ok 423 — any is a Function +ok 424 — Returns true for arrays with at least one truthy value +ok 425 — Returns false for arrays with no truthy values +ok 426 — Returns false for arrays with no truthy values +ok 427 — Returns true with predicate function +ok 428 — Returns false with a predicate function - ✔ debounce is a Function +# PASS test\curry\curry.test.js - Testing decapitalize +ok 429 — curry is a Function +ok 430 — curries a Math.pow +ok 431 — curries a Math.min - ✔ decapitalize is a Function - ✔ Works with default parameter - ✔ Works with second parameter set to true +# PASS test\when\when.test.js - Testing deepClone +ok 432 — when is a Function +ok 433 — Returns the proper result +ok 434 — Returns the proper result - ✔ deepClone is a Function - ✔ Shallow cloning works - ✔ Deep cloning works - ✔ Array shallow cloning works - ✔ Array deep cloning works +# PASS test\hasFlags\hasFlags.test.js - Testing deepFlatten +ok 435 — hasFlags is a Function - ✔ deepFlatten is a Function - ✔ Deep flattens an array +# PASS test\randomHexColorCode\randomHexColorCode.test.js - Testing defaults +ok 436 — randomHexColorCode is a Function +ok 437 — randomHexColorCode has to proper length +ok 438 — The color code starts with "#" +ok 439 — The color code contains only valid hex-digits - ✔ defaults is a Function - ✔ Assigns default values for undefined properties +# PASS test\getURLParameters\getURLParameters.test.js - Testing defer +ok 440 — getURLParameters is a Function +ok 441 — Returns an object containing the parameters of the current URL - ✔ defer is a Function - ✔ Tested by @chalarangelo on 16/02/2018 +# PASS test\last\last.test.js - Testing degreesToRads +ok 442 — last is a Function +ok 443 — last({ a: 1234}) returns undefined +ok 444 — last([1, 2, 3]) returns 3 +ok 445 — last({ 0: false}) returns undefined +ok 446 — last(String) returns g +ok 447 — last(null) throws an Error +ok 448 — last(undefined) throws an Error +ok 449 — last() throws an Error +ok 450 — last([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run - ✔ degreesToRads is a Function - ✔ Returns the appropriate value +# PASS test\flip\flip.test.js - Testing delay +ok 451 — flip is a Function +ok 452 — Flips argument order - ✔ delay is a Function +# PASS test\formatDuration\formatDuration.test.js - Testing detectDeviceType +ok 453 — formatDuration is a Function +ok 454 — Returns the human readable format of the given number of milliseconds +ok 455 — Returns the human readable format of the given number of milliseconds - ✔ detectDeviceType is a Function - ✔ Tested on 09/02/2018 by @chalarangelo +# PASS test\isWeakSet\isWeakSet.test.js - Testing difference +ok 456 — isWeakSet is a Function - ✔ difference is a Function - ✔ Returns the difference between two arrays +# PASS test\bindAll\bindAll.test.js - Testing differenceBy +ok 457 — bindAll is a Function +ok 458 — Binds to an object context - ✔ differenceBy is a Function - ✔ Works using a native function and numbers - ✔ Works with arrow function and objects +# PASS test\maxBy\maxBy.test.js - Testing differenceWith +ok 459 — maxBy is a Function +ok 460 — Produces the right result with a function +ok 461 — Produces the right result with a property name - ✔ differenceWith is a Function - ✔ Filters out all values from an array +# PASS test\averageBy\averageBy.test.js - Testing digitize +ok 462 — averageBy is a Function +ok 463 — Produces the right result with a function +ok 464 — Produces the right result with a property name - ✔ digitize is a Function - ✔ Converts a number to an array of digits +# PASS test\removeVowels\removeVowels.test.js - Testing distance +ok 465 — removeVowels is a Function - ✔ distance is a Function - ✔ Calculates the distance between two points +# PASS test\equals\equals.test.js - Testing drop +ok 466 — equals is a Function +ok 467 — { a: [2, {e: 3}], b: [4], c: 'foo' } is equal to { a: [2, {e: 3}], b: [4], c: 'foo' } +ok 468 — [1,2,3] is equal to [1,2,3] +ok 469 — { a: [2, 3], b: [4] } is not equal to { a: [2, 3], b: [6] } +ok 470 — [1,2,3] is not equal to [1,2,4] +ok 471 — [1, 2, 3] should be equal to { 0: 1, 1: 2, 2: 3 }) - type is different, but their enumerable properties match. - ✔ drop is a Function - ✔ Works without the last argument - ✔ Removes appropriate element count as specified - ✔ Empties array given a count greater than length +# PASS test\sleep\sleep.test.js - Testing dropRight +ok 472 — sleep is a Function +ok 473 — Works as expected - ✔ dropRight is a Function - ✔ Returns a new array with n elements removed from the right - ✔ Returns a new array with n elements removed from the right - ✔ Returns a new array with n elements removed from the right +# PASS test\over\over.test.js - Testing dropRightWhile +ok 474 — over is a Function +ok 475 — Applies given functions over multiple arguments - ✔ dropRightWhile is a Function - ✔ Removes elements from the end of an array until the passed function returns true. +# PASS test\findLast\findLast.test.js - Testing dropWhile +ok 476 — findLast is a Function +ok 477 — Finds last element for which the given function returns true - ✔ dropWhile is a Function - ✔ Removes elements in an array until the passed function returns true. +# PASS test\unescapeHTML\unescapeHTML.test.js - Testing elementIsVisibleInViewport +ok 478 — unescapeHTML is a Function +ok 479 — Unescapes escaped HTML characters. - ✔ elementIsVisibleInViewport is a Function - ✔ Tested on 09/02/2018 by @chalarangelo +# PASS test\sortCharactersInString\sortCharactersInString.test.js - Testing elo +ok 480 — sortCharactersInString is a Function +ok 481 — Alphabetically sorts the characters in a string. - ✔ elo is a Function - ✔ Standard 1v1s - ✔ should be equivalent - ✔ 4 player FFA, all same rank +# PASS test\JSONToDate\JSONToDate.test.js - Testing equals +ok 482 — JSONToDate is a Function - ✔ equals is a Function - ✔ { a: [2, {e: 3}], b: [4], c: 'foo' } is equal to { a: [2, {e: 3}], b: [4], c: 'foo' } - ✔ [1,2,3] is equal to [1,2,3] - ✔ { a: [2, 3], b: [4] } is not equal to { a: [2, 3], b: [6] } - ✔ [1,2,3] is not equal to [1,2,4] - ✔ [1, 2, 3] should be equal to { 0: 1, 1: 2, 2: 3 }) - type is different, but their enumerable properties match. +# PASS test\negate\negate.test.js - Testing escapeHTML +ok 483 — negate is a Function +ok 484 — Negates a predicate function - ✔ escapeHTML is a Function - ✔ Escapes a string for use in HTML +# PASS test\mostPerformant\mostPerformant.test.js - Testing escapeRegExp +ok 485 — mostPerformant is a Function - ✔ escapeRegExp is a Function - ✔ Escapes a string to use in a regular expression +# PASS test\flattenObject\flattenObject.test.js - Testing everyNth +ok 486 — flattenObject is a Function +ok 487 — Flattens an object with the paths for keys +ok 488 — Works with arrays - ✔ everyNth is a Function - ✔ Returns every nth element in an array +# PASS test\shuffle\shuffle.test.js - Testing extendHex +ok 489 — shuffle is a Function +ok 490 — Shuffles the array +ok 491 — New array contains all original elements +ok 492 — Works for empty arrays +ok 493 — Works for single-element arrays - ✔ extendHex is a Function - ✔ Extends a 3-digit color code to a 6-digit color code - ✔ Extends a 3-digit color code to a 6-digit color code +# PASS test\matchesWith\matchesWith.test.js - Testing factorial +ok 494 — matchesWith is a Function +ok 495 — Returns true for two objects with similar values, based on the provided function - ✔ factorial is a Function - ✔ Calculates the factorial of 720 - ✔ Calculates the factorial of 0 - ✔ Calculates the factorial of 1 - ✔ Calculates the factorial of 4 - ✔ Calculates the factorial of 10 +# PASS test\renameKeys\renameKeys.test.js - Testing factors +ok 496 — renameKeys is a Function +ok 497 — renameKeys is a Function - ✔ factors is a Function +# PASS test\show\show.test.js - Testing fibonacci +ok 498 — show is a Function - ✔ fibonacci is a Function - ✔ Generates an array, containing the Fibonacci sequence +# PASS test\on\on.test.js - Testing fibonacciCountUntilNum +ok 499 — on is a Function - ✔ fibonacciCountUntilNum is a Function +# PASS test\extendHex\extendHex.test.js - Testing fibonacciUntilNum +ok 500 — extendHex is a Function +ok 501 — Extends a 3-digit color code to a 6-digit color code +ok 502 — Extends a 3-digit color code to a 6-digit color code - ✔ fibonacciUntilNum is a Function +# PASS test\sample\sample.test.js - Testing filterNonUnique +ok 503 — sample is a Function +ok 504 — Returns a random element from the array +ok 505 — Works for single-element arrays +ok 506 — Returns undefined for empty array - ✔ filterNonUnique is a Function - ✔ Filters out the non-unique values in an array +# PASS test\coalesceFactory\coalesceFactory.test.js - Testing findKey +ok 507 — coalesceFactory is a Function +ok 508 — Returns a customized coalesce function - ✔ findKey is a Function - ✔ Returns the appropriate key +# PASS test\unary\unary.test.js - Testing findLast +ok 509 — unary is a Function +ok 510 — Discards arguments after the first one - ✔ findLast is a Function - ✔ Finds last element for which the given function returns true +# PASS test\fibonacci\fibonacci.test.js - Testing findLastIndex +ok 511 — fibonacci is a Function +ok 512 — Generates an array, containing the Fibonacci sequence - ✔ findLastIndex is a Function - ✔ Finds last index for which the given function returns true +# PASS test\palindrome\palindrome.test.js - Testing findLastKey +ok 513 — palindrome is a Function +ok 514 — Given string is a palindrome +ok 515 — Given string is not a palindrome - ✔ findLastKey is a Function - ✔ Returns the appropriate key +# PASS test\shallowClone\shallowClone.test.js - Testing flatten +ok 516 — shallowClone is a Function +ok 517 — Shallow cloning works +ok 518 — Does not clone deeply - ✔ flatten is a Function - ✔ Flattens an array - ✔ Flattens an array +# PASS test\isBrowserTabFocused\isBrowserTabFocused.test.js - Testing flattenObject +ok 519 — isBrowserTabFocused is a Function - ✔ flattenObject is a Function - ✔ Flattens an object with the paths for keys - ✔ Works with arrays +# PASS test\sumBy\sumBy.test.js - Testing flip +ok 520 — sumBy is a Function - ✔ flip is a Function - ✔ Flips argument order +# PASS test\minBy\minBy.test.js - Testing forEachRight +ok 521 — minBy is a Function +ok 522 — Produces the right result with a function +ok 523 — Produces the right result with a property name - ✔ forEachRight is a Function - ✔ Iterates over the array in reverse +# PASS test\findLastKey\findLastKey.test.js - Testing forOwn +ok 524 — findLastKey is a Function +ok 525 — eturns the appropriate key - ✔ forOwn is a Function - ✔ Iterates over an element's key-value pairs +# PASS test\countVowels\countVowels.test.js - Testing forOwnRight +ok 526 — countVowels is a Function - ✔ forOwnRight is a Function - ✔ Iterates over an element's key-value pairs in reverse +# PASS test\factors\factors.test.js - Testing formatDuration +ok 527 — factors is a Function - ✔ formatDuration is a Function - ✔ Returns the human readable format of the given number of milliseconds - ✔ Returns the human readable format of the given number of milliseconds +# PASS test\is\is.test.js - Testing fromCamelCase +ok 528 — is is a Function +ok 529 — Works for arrays with data +ok 530 — Works for empty arrays +ok 531 — Works for arrays, not objects +ok 532 — Works for objects +ok 533 — Works for maps +ok 534 — Works for regular expressions +ok 535 — Works for sets +ok 536 — Works for weak maps +ok 537 — Works for weak sets +ok 538 — Works for strings - returns true for primitive +ok 539 — Works for strings - returns true when using constructor +ok 540 — Works for numbers - returns true for primitive +ok 541 — Works for numbers - returns true when using constructor +ok 542 — Works for booleans - returns true for primitive +ok 543 — Works for booleans - returns true when using constructor +ok 544 — Works for functions - ✔ fromCamelCase is a Function - ✔ Converts a string from camelcase - ✔ Converts a string from camelcase - ✔ Converts a string from camelcase +# PASS test\converge\converge.test.js - Testing functionName +ok 545 — converge is a Function +ok 546 — Produces the average of the array +ok 547 — Produces the strange concatenation - ✔ functionName is a Function - ✔ Works for native functions - ✔ Works for functions - ✔ Works for arrow functions +# PASS test\observeMutations\observeMutations.test.js - Testing functions +ok 548 — observeMutations is a Function - ✔ functions is a Function - ✔ Returns own methods - ✔ Returns own and inherited methods +# PASS test\isTravisCI\isTravisCI.test.js - Testing gcd +ok 549 — isTravisCI is a Function +ok 550 — Not running on Travis, correctly evaluates - ✔ gcd is a Function - ✔ Calculates the greatest common divisor between two or more numbers/arrays - ✔ Calculates the greatest common divisor between two or more numbers/arrays +# PASS test\maxN\maxN.test.js - Testing geometricProgression +ok 551 — maxN is a Function +ok 552 — Returns the n maximum elements from the provided array +ok 553 — Returns the n maximum elements from the provided array - ✔ geometricProgression is a Function - ✔ Initializes an array containing the numbers in the specified range - ✔ Initializes an array containing the numbers in the specified range - ✔ Initializes an array containing the numbers in the specified range +# PASS test\objectToPairs\objectToPairs.test.js - Testing get +ok 554 — objectToPairs is a Function +ok 555 — Creates an array of key-value pair arrays from an object. - ✔ get is a Function - ✔ Retrieve a property indicated by the selector from an object. +# PASS test\forEachRight\forEachRight.test.js - Testing getColonTimeFromDate +ok 556 — forEachRight is a Function +ok 557 — Iterates over the array in reverse - ✔ getColonTimeFromDate is a Function +# PASS test\isNil\isNil.test.js - Testing getDaysDiffBetweenDates +ok 558 — isNil is a Function +ok 559 — Returns true for null +ok 560 — Returns true for undefined +ok 561 — Returns false for an empty string - ✔ getDaysDiffBetweenDates is a Function - ✔ Returns the difference in days between two dates +# PASS test\bifurcateBy\bifurcateBy.test.js - Testing getMeridiemSuffixOfInteger +ok 562 — bifurcateBy is a Function +ok 563 — Splits the collection into two groups - ✔ getMeridiemSuffixOfInteger is a Function +# PASS test\digitize\digitize.test.js - Testing getScrollPosition +ok 564 — digitize is a Function +ok 565 — Converts a number to an array of digits - ✔ getScrollPosition is a Function - ✔ Tested by @chalarangelo on 16/02/2018 +# PASS test\isUndefined\isUndefined.test.js - Testing getStyle +ok 566 — isUndefined is a Function +ok 567 — Returns true for undefined - ✔ getStyle is a Function - ✔ Tested by @chalarangelo on 16/02/2018 +# PASS test\isUpperCase\isUpperCase.test.js - Testing getType +ok 568 — isUpperCase is a Function +ok 569 — ABC is all upper case +ok 570 — abc is not all upper case +ok 571 — A3@$ is all uppercase - ✔ getType is a Function - ✔ Returns the native type of a value +# PASS test\isEven\isEven.test.js - Testing getURLParameters +ok 572 — isEven is a Function +ok 573 — 4 is even number +ok 574 — 5 is not an even number - ✔ getURLParameters is a Function - ✔ Returns an object containing the parameters of the current URL +# PASS test\countOccurrences\countOccurrences.test.js - Testing groupBy +ok 575 — countOccurrences is a Function +ok 576 — Counts the occurrences of a value in an array - ✔ groupBy is a Function - ✔ Groups the elements of an array based on the given function - ✔ Groups the elements of an array based on the given function +# PASS test\randomIntArrayInRange\randomIntArrayInRange.test.js - Testing hammingDistance +ok 577 — randomIntArrayInRange is a Function +ok 578 — The returned array contains only integers +ok 579 — The returned array has the proper length +ok 580 — The returned array's values lie between provided lowerLimit and upperLimit (both inclusive). - ✔ hammingDistance is a Function - ✔ retuns hamming disance between 2 values +# PASS test\collatz\collatz.test.js - Testing hasClass +ok 581 — collatz is a Function +ok 582 — When n is even, divide by 2 +ok 583 — When n is odd, times by 3 and add 1 +ok 584 — Eventually reaches 1 - ✔ hasClass is a Function +# PASS test\isLowerCase\isLowerCase.test.js - Testing hasFlags +ok 585 — isLowerCase is a Function +ok 586 — passed string is a lowercase +ok 587 — passed string is a lowercase +ok 588 — passed value is not a lowercase - ✔ hasFlags is a Function - ✔ Tested by @chalarangelo on 16/02/2018 +# PASS test\filterNonUnique\filterNonUnique.test.js - Testing hashBrowser +ok 589 — filterNonUnique is a Function +ok 590 — Filters out the non-unique values in an array - ✔ hashBrowser is a Function - ✔ Tested by @chalarangelo on 16/02/2018 +# PASS test\unflattenObject\unflattenObject.test.js - Testing hashNode +ok 591 — unflattenObject is a Function +ok 592 — Unflattens an object with the paths for keys - ✔ hashNode is a Function +# PASS test\capitalizeEveryWord\capitalizeEveryWord.test.js - Testing head +ok 593 — capitalizeEveryWord is a Function +ok 594 — Capitalizes the first letter of every word in a string +ok 595 — Works with characters +ok 596 — Works with one word string - ✔ head is a Function - ✔ head({ a: 1234}) returns undefined - ✔ head([1, 2, 3]) returns 1 - ✔ head({ 0: false}) returns false - ✔ head(String) returns S - ✔ head(null) throws an Error - ✔ head(undefined) throws an Error - ✔ head() throws an Error - ✔ head([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run +# PASS test\pickBy\pickBy.test.js - Testing hexToRGB +ok 597 — pickBy is a Function +ok 598 — Creates an object composed of the properties the given function returns truthy for. - ✔ hexToRGB is a Function - ✔ Converts a color code to a rgb() or rgba() string - ✔ Converts a color code to a rgb() or rgba() string - ✔ Converts a color code to a rgb() or rgba() string +# PASS test\takeRight\takeRight.test.js - Testing hide +ok 599 — takeRight is a Function +ok 600 — Returns an array with n elements removed from the end +ok 601 — Returns an array with n elements removed from the end - ✔ hide is a Function - ✔ Tested by @chalarangelo on 16/02/2018 +# PASS test\compact\compact.test.js - Testing howManyTimes +ok 602 — compact is a Function +ok 603 — Removes falsey values from an array - ✔ howManyTimes is a Function +# PASS test\dropRight\dropRight.test.js - Testing httpDelete +ok 604 — dropRight is a Function +ok 605 — Returns a new array with n elements removed from the right +ok 606 — Returns a new array with n elements removed from the right +ok 607 — Returns a new array with n elements removed from the right - ✔ httpDelete is a Function +# PASS test\standardDeviation\standardDeviation.test.js - Testing httpGet +ok 608 — standardDeviation is a Function +ok 609 — Returns the standard deviation of an array of numbers +ok 610 — Returns the standard deviation of an array of numbers - ✔ httpGet is a Function +# PASS test\distance\distance.test.js - Testing httpPost +ok 611 — distance is a Function +ok 612 — Calculates the distance between two points - ✔ httpPost is a Function +# PASS test\isPrime\isPrime.test.js - Testing httpPut +ok 613 — isPrime is a Function +ok 614 — passed number is a prime - ✔ httpPut is a Function +# PASS test\unionWith\unionWith.test.js - Testing httpsRedirect +ok 615 — unionWith is a Function +ok 616 — Produces the appropriate results - ✔ httpsRedirect is a Function - ✔ Tested on 09/02/2018 by @chalarangelo +# PASS test\getScrollPosition\getScrollPosition.test.js - Testing hz +ok 617 — getScrollPosition is a Function - ✔ hz is a Function +# PASS test\deepFlatten\deepFlatten.test.js - Testing inRange +ok 618 — deepFlatten is a Function +ok 619 — Deep flattens an array - ✔ inRange is a Function - ✔ The given number falls within the given range - ✔ The given number falls within the given range - ✔ The given number does not falls within the given range - ✔ The given number does not falls within the given range +# PASS test\reject\reject.test.js - Testing indexOfAll +ok 620 — reject is a Function +ok 621 — Works with numbers +ok 622 — Works with strings - ✔ indexOfAll is a Function - ✔ Returns all indices of val in an array - ✔ Returns all indices of val in an array +# PASS test\omit\omit.test.js - Testing initial +ok 623 — omit is a Function +ok 624 — Omits the key-value pairs corresponding to the given keys from an object - ✔ initial is a Function - ✔ Returns all the elements of an array except the last one +# PASS test\howManyTimes\howManyTimes.test.js - Testing initialize2DArray +ok 625 — howManyTimes is a Function - ✔ initialize2DArray is a Function - ✔ Initializes a 2D array of given width and height and value +# PASS test\merge\merge.test.js - Testing initializeArrayWithRange +ok 626 — merge is a Function +ok 627 — Merges two objects - ✔ initializeArrayWithRange is a Function - ✔ Initializes an array containing the numbers in the specified range +# PASS test\findKey\findKey.test.js - Testing initializeArrayWithRangeRight +ok 628 — findKey is a Function +ok 629 — Returns the appropriate key - ✔ initializeArrayWithRangeRight is a Function +# PASS test\randomNumberInRange\randomNumberInRange.test.js - Testing initializeArrayWithValues +ok 630 — randomNumberInRange is a Function +ok 631 — The returned value is a number +ok 632 — The returned value lies between provided lowerLimit and upperLimit (both inclusive). - ✔ initializeArrayWithValues is a Function - ✔ Initializes and fills an array with the specified values +# PASS test\pullAtValue\pullAtValue.test.js - Testing initializeNDArray +ok 633 — pullAtValue is a Function +ok 634 — Pulls the specified values +ok 635 — Pulls the specified values - ✔ initializeNDArray is a Function +# PASS test\readFileLines\readFileLines.test.js - Testing intersection +ok 636 — readFileLines is a Function - ✔ intersection is a Function - ✔ Returns a list of elements that exist in both arrays +# PASS test\redirect\redirect.test.js - Testing intersectionBy +ok 637 — redirect is a Function - ✔ intersectionBy is a Function - ✔ Returns a list of elements that exist in both arrays, after applying the provided function to each array element of both +# PASS test\throttle\throttle.test.js - Testing intersectionWith +ok 638 — throttle is a Function - ✔ intersectionWith is a Function - ✔ Returns a list of elements that exist in both arrays, using a provided comparator function +# PASS test\hasClass\hasClass.test.js - Testing invertKeyValues +ok 639 — hasClass is a Function - ✔ invertKeyValues is a Function - ✔ invertKeyValues({ a: 1, b: 2, c: 1 }) returns { 1: [ 'a', 'c' ], 2: [ 'b' ] } - ✔ invertKeyValues({ a: 1, b: 2, c: 1 }, value => 'group' + value) returns { group1: [ 'a', 'c' ], group2: [ 'b' ] } +# PASS test\serializeCookie\serializeCookie.test.js - Testing is +ok 640 — serializeCookie is a Function +ok 641 — Serializes the cookie - ✔ is is a Function - ✔ Works for arrays with data - ✔ Works for empty arrays - ✔ Works for arrays, not objects - ✔ Works for objects - ✔ Works for maps - ✔ Works for regular expressions - ✔ Works for sets - ✔ Works for weak maps - ✔ Works for weak sets - ✔ Works for strings - returns true for primitive - ✔ Works for strings - returns true when using constructor - ✔ Works for numbers - returns true for primitive - ✔ Works for numbers - returns true when using constructor - ✔ Works for booleans - returns true for primitive - ✔ Works for booleans - returns true when using constructor - ✔ Works for functions +# PASS test\collectInto\collectInto.test.js - Testing isAbsoluteURL +ok 642 — collectInto is a Function +ok 643 — Works with multiple promises - ✔ isAbsoluteURL is a Function - ✔ Given string is an absolute URL - ✔ Given string is an absolute URL - ✔ Given string is not an absolute URL +# PASS test\zipWith\zipWith.test.js - Testing isAnagram +ok 644 — zipWith is a Function - ✔ isAnagram is a Function - ✔ Checks valid anagram - ✔ Works with spaces - ✔ Ignores case - ✔ Ignores special characters +# PASS test\escapeHTML\escapeHTML.test.js - Testing isArmstrongNumber +ok 645 — escapeHTML is a Function +ok 646 — Escapes a string for use in HTML - ✔ isArmstrongNumber is a Function +# PASS test\unzipWith\unzipWith.test.js - Testing isArray +ok 647 — unzipWith is a Function +ok 648 — unzipWith([[1, 10, 100], [2, 20, 200]], (...args) => args.reduce((acc, v) => acc + v, 0)) equals [3, 30, 300] - ✔ isArray is a Function - ✔ passed value is an array - ✔ passed value is not an array +# PASS test\speechSynthesis\speechSynthesis.test.js - Testing isArrayBuffer +ok 649 — speechSynthesis is a Function - ✔ isArrayBuffer is a Function +# PASS test\binomialCoefficient\binomialCoefficient.test.js - Testing isArrayLike +ok 650 — binomialCoefficient is a Function +ok 651 — Returns the appropriate value +ok 652 — Returns the appropriate value +ok 653 — Returns the appropriate value +ok 654 — Returns NaN +ok 655 — Returns NaN - ✔ isArrayLike is a Function - ✔ Returns true for a string - ✔ Returns true for an array - ✔ Returns false for null +# PASS test\stringPermutations\stringPermutations.test.js - Testing isBoolean +ok 656 — stringPermutations is a Function +ok 657 — Generates all stringPermutations of a string +ok 658 — Works for single-letter strings +ok 659 — Works for empty strings - ✔ isBoolean is a Function - ✔ passed value is not a boolean - ✔ passed value is not a boolean +# PASS test\setStyle\setStyle.test.js - Testing isBrowser +ok 660 — setStyle is a Function - ✔ isBrowser is a Function +# PASS test\flatten\flatten.test.js - Testing isBrowserTabFocused +ok 661 — flatten is a Function +ok 662 — Flattens an array +ok 663 — Flattens an array - ✔ isBrowserTabFocused is a Function +# PASS test\reduceSuccessive\reduceSuccessive.test.js - Testing isDivisible +ok 664 — reduceSuccessive is a Function +ok 665 — Returns the array of successively reduced values - ✔ isDivisible is a Function - ✔ The number 6 is divisible by 3 +# PASS test\lowercaseKeys\lowercaseKeys.test.js - Testing isEmpty +ok 666 — lowercaseKeys is a Function +ok 667 — Lowercases object keys +ok 668 — Does not mutate original object - ✔ isEmpty is a Function - ✔ Returns true for empty Map - ✔ Returns true for empty Set - ✔ Returns true for empty array - ✔ Returns true for empty object - ✔ Returns true for empty string - ✔ Returns false for non-empty array - ✔ Returns false for non-empty object - ✔ Returns false for non-empty string - ✔ Returns true - type is not considered a collection - ✔ Returns true - type is not considered a collection +# PASS test\isArmstrongNumber\isArmstrongNumber.test.js - Testing isEven +ok 669 — isArmstrongNumber is a Function - ✔ isEven is a Function - ✔ 4 is even number - ✔ undefined +# PASS test\toHash\toHash.test.js - Testing isFunction +ok 670 — toHash is a Function - ✔ isFunction is a Function - ✔ passed value is a function - ✔ passed value is not a function +# PASS test\dropRightWhile\dropRightWhile.test.js - Testing isLowerCase +ok 671 — dropRightWhile is a Function +ok 672 — Removes elements from the end of an array until the passed function returns true. - ✔ isLowerCase is a Function - ✔ passed string is a lowercase - ✔ passed string is a lowercase - ✔ passed value is not a lowercase +# PASS test\none\none.test.js - Testing isMap +ok 673 — none is a Function +ok 674 — Returns true for arrays with no truthy values +ok 675 — Returns false for arrays with at least one truthy value +ok 676 — Returns true with a predicate function +ok 677 — Returns false with predicate function - ✔ isMap is a Function +# PASS test\initialize2DArray\initialize2DArray.test.js - Testing isNil +ok 678 — initialize2DArray is a Function +ok 679 — Initializes a 2D array of given width and height and value - ✔ isNil is a Function - ✔ Returns true for null - ✔ Returns true for undefined - ✔ Returns false for an empty string +# PASS test\getStyle\getStyle.test.js - Testing isNull +ok 680 — getStyle is a Function - ✔ isNull is a Function - ✔ passed argument is a null - ✔ passed argument is a null +# PASS test\transform\transform.test.js - Testing isNumber +ok 681 — transform is a Function +ok 682 — Transforms an object - ✔ isNumber is a Function - ✔ passed argument is a number - ✔ passed argument is not a number +# PASS test\truthCheckCollection\truthCheckCollection.test.js - Testing isObject +ok 683 — truthCheckCollection is a Function +ok 684 — second argument is truthy on all elements of a collection - ✔ isObject is a Function - ✔ isObject([1, 2, 3, 4]) is a object - ✔ isObject([]) is a object - ✔ isObject({ a:1 }) is a object - ✔ isObject(true) is not a object +# PASS test\deepClone\deepClone.test.js - Testing isObjectLike +ok 685 — deepClone is a Function +ok 686 — Shallow cloning works +ok 687 — Deep cloning works +ok 688 — Array shallow cloning works +ok 689 — Array deep cloning works - ✔ isObjectLike is a Function - ✔ Returns true for an object - ✔ Returns true for an array - ✔ Returns false for a function - ✔ Returns false for null +# PASS test\uncurry\uncurry.test.js - Testing isPlainObject +ok 690 — uncurry is a Function +ok 691 — Works without a provided value for n +ok 692 — Works with n = 2 +ok 693 — Works with n = 3 - ✔ isPlainObject is a Function - ✔ Returns true for a plain object - ✔ Returns false for a Map (example of non-plain object) +# PASS test\dropWhile\dropWhile.test.js - Testing isPrime +ok 694 — dropWhile is a Function +ok 695 — Removes elements in an array until the passed function returns true. - ✔ isPrime is a Function - ✔ passed number is a prime +# PASS test\initial\initial.test.js - Testing isPrimitive +ok 696 — initial is a Function +ok 697 — Returns all the elements of an array except the last one - ✔ isPrimitive is a Function - ✔ isPrimitive(null) is primitive - ✔ isPrimitive(undefined) is primitive - ✔ isPrimitive(string) is primitive - ✔ isPrimitive(true) is primitive - ✔ isPrimitive(50) is primitive - ✔ isPrimitive('Hello') is primitive - ✔ isPrimitive(false) is primitive - ✔ isPrimitive(Symbol()) is primitive - ✔ isPrimitive([1, 2, 3]) is not primitive - ✔ isPrimitive({ a: 123 }) is not primitive - ✔ isPrimitive({ a: 123 }) takes less than 2s to run +# PASS test\fibonacciUntilNum\fibonacciUntilNum.test.js - Testing isPromiseLike +ok 698 — fibonacciUntilNum is a Function - ✔ isPromiseLike is a Function - ✔ Returns true for a promise-like object - ✔ Returns false for null - ✔ Returns false for an empty object +# PASS test\zip\zip.test.js - Testing isRegExp +ok 699 — zip is a Function +ok 700 — zip([a, b], [1, 2], [true, false]) returns [[a, 1, true], [b, 2, false]] +ok 701 — zip([a], [1, 2], [true, false]) returns [[a, 1, true], [undefined, 2, false]] +ok 702 — zip([]) returns [] +ok 703 — zip(123) returns [] +ok 704 — zip([a, b], [1, 2], [true, false]) returns an Array +ok 705 — zip([a], [1, 2], [true, false]) returns an Array +ok 706 — zip(null) throws an error +ok 707 — zip(undefined) throws an error - ✔ isRegExp is a Function +# PASS test\clampNumber\clampNumber.test.js - Testing isSet +ok 708 — clampNumber is a Function +ok 709 — Clamps num within the inclusive range specified by the boundary values a and b - ✔ isSet is a Function +# PASS test\degreesToRads\degreesToRads.test.js - Testing isSimilar +ok 710 — degreesToRads is a Function +ok 711 — Returns the appropriate value - ✔ isSimilar is a Function +# PASS test\isArrayLike\isArrayLike.test.js - Testing isSorted +ok 712 — isArrayLike is a Function +ok 713 — Returns true for a string +ok 714 — Returns true for an array +ok 715 — Returns false for null - ✔ isSorted is a Function - ✔ Array is sorted in ascending order - ✔ Array is sorted in ascending order - ✔ Array is sorted in ascending order - ✔ Array is sorted in ascending order - ✔ Array is sorted in descending order - ✔ Array is sorted in descending order - ✔ Array is sorted in descending order - ✔ Array is sorted in descending order - ✔ Array is empty - ✔ Array is not sorted, direction changed in array - ✔ Array is not sorted, direction changed in array +# PASS test\currentURL\currentURL.test.js - Testing isString +ok 716 — currentURL is a Function - ✔ isString is a Function - ✔ foo is a string - ✔ "10" is a string - ✔ Empty string is a string - ✔ 10 is not a string - ✔ true is not string +# PASS test\drop\drop.test.js - Testing isSymbol +ok 717 — drop is a Function +ok 718 — Works without the last argument +ok 719 — Removes appropriate element count as specified +ok 720 — Empties array given a count greater than length - ✔ isSymbol is a Function - ✔ Checks if the given argument is a symbol +# PASS test\hexToRGB\hexToRGB.test.js - Testing isTravisCI +ok 721 — hexToRGB is a Function +ok 722 — Converts a color code to a rgb() or rgba() string +ok 723 — Converts a color code to a rgb() or rgba() string +ok 724 — Converts a color code to a rgb() or rgba() string - ✔ isTravisCI is a Function - ✔ Running on Travis, correctly evaluates +# PASS test\spreadOver\spreadOver.test.js - Testing isTypedArray +ok 725 — spreadOver is a Function +ok 726 — Takes a variadic function and returns a closure that accepts an array of arguments to map to the inputs of the function. - ✔ isTypedArray is a Function +# PASS test\initializeArrayWithRange\initializeArrayWithRange.test.js - Testing isUndefined +ok 727 — initializeArrayWithRange is a Function +ok 728 — Initializes an array containing the numbers in the specified range - ✔ isUndefined is a Function - ✔ Returns true for undefined +# PASS test\composeRight\composeRight.test.js - Testing isUpperCase +ok 729 — composeRight is a Function +ok 730 — Performs left-to-right function composition - ✔ isUpperCase is a Function - ✔ ABC is all upper case - ✔ abc is not all upper case - ✔ A3@$ is all uppercase +# PASS test\isPromiseLike\isPromiseLike.test.js - Testing isValidJSON +ok 731 — isPromiseLike is a Function +ok 732 — Returns true for a promise-like object +ok 733 — Returns false for an empty object - ✔ isValidJSON is a Function - ✔ {"name":"Adam","age":20} is a valid JSON - ✔ {"name":"Adam",age:"20"} is not a valid JSON - ✔ null is a valid JSON +# PASS test\isFunction\isFunction.test.js - Testing isWeakMap +ok 734 — isFunction is a Function +ok 735 — passed value is a function +ok 736 — passed value is not a function - ✔ isWeakMap is a Function +# PASS test\off\off.test.js - Testing isWeakSet +ok 737 — off is a Function - ✔ isWeakSet is a Function +# PASS test\byteSize\byteSize.test.js - Testing join +ok 738 — byteSize is a Function +ok 739 — Works for a single letter +ok 740 — Works for a common string +ok 741 — Works for emoji - ✔ join is a Function - ✔ Joins all elements of an array into a string and returns this string - ✔ Joins all elements of an array into a string and returns this string - ✔ Joins all elements of an array into a string and returns this string +# PASS test\sumPower\sumPower.test.js - Testing last +ok 742 — sumPower is a Function +ok 743 — Returns the sum of the powers of all the numbers from start to end +ok 744 — Returns the sum of the powers of all the numbers from start to end +ok 745 — Returns the sum of the powers of all the numbers from start to end - ✔ last is a Function - ✔ last({ a: 1234}) returns undefined - ✔ last([1, 2, 3]) returns 3 - ✔ last({ 0: false}) returns undefined - ✔ last(String) returns g - ✔ last(null) throws an Error - ✔ last(undefined) throws an Error - ✔ last() throws an Error - ✔ last([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run +# PASS test\levenshteinDistance\levenshteinDistance.test.js - Testing lcm +ok 746 — levenshteinDistance is a Function - ✔ lcm is a Function - ✔ Returns the least common multiple of two or more numbers. - ✔ Returns the least common multiple of two or more numbers. +# PASS test\isSet\isSet.test.js - Testing levenshteinDistance +ok 747 — isSet is a Function - ✔ levenshteinDistance is a Function +# PASS test\copyToClipboard\copyToClipboard.test.js - Testing longestItem +ok 748 — copyToClipboard is a Function - ✔ longestItem is a Function - ✔ Returns the longest object +# PASS test\objectFromPairs\objectFromPairs.test.js - Testing lowercaseKeys +ok 749 — objectFromPairs is a Function +ok 750 — Creates an object from the given key-value pairs. - ✔ lowercaseKeys is a Function - ✔ Lowercases object keys - ✔ Does not mutate original object +# PASS test\once\once.test.js - Testing luhnCheck +ok 751 — once is a Function - ✔ luhnCheck is a Function - ✔ validates identification number - ✔ validates identification number - ✔ validates identification number +# PASS test\bottomVisible\bottomVisible.test.js - Testing mapKeys +ok 752 — bottomVisible is a Function - ✔ mapKeys is a Function - ✔ Maps keys +# PASS test\pipeAsyncFunctions\pipeAsyncFunctions.test.js - Testing mapObject +ok 753 — pipeAsyncFunctions is a Function +ok 754 — pipeAsyncFunctions result should be 15 - ✔ mapObject is a Function - ✔ mapObject([1, 2, 3], a => a * a) returns { 1: 1, 2: 4, 3: 9 } - ✔ mapObject([1, 2, 3, 4], (a, b) => b - a) returns { 1: -1, 2: -1, 3: -1, 4: -1 } - ✔ mapObject([1, 2, 3, 4], (a, b) => a - b) returns { 1: 1, 2: 1, 3: 1, 4: 1 } +# PASS test\takeWhile\takeWhile.test.js - Testing mapValues +ok 755 — takeWhile is a Function +ok 756 — Removes elements until the function returns true - ✔ mapValues is a Function - ✔ Maps values +# PASS test\sum\sum.test.js - Testing mask +ok 757 — sum is a Function +ok 758 — Returns the sum of two or more numbers/arrays. - ✔ mask is a Function - ✔ Replaces all but the last num of characters with the specified mask character - ✔ Replaces all but the last num of characters with the specified mask character - ✔ Replaces all but the last num of characters with the specified mask character +# PASS test\hide\hide.test.js - Testing matches +ok 759 — hide is a Function - ✔ matches is a Function - ✔ Matches returns true for two similar objects - ✔ Matches returns false for two non-similar objects +# PASS test\toDecimalMark\toDecimalMark.test.js - Testing matchesWith +ok 760 — toDecimalMark is a Function +ok 761 — convert a float-point arithmetic to the Decimal mark form - ✔ matchesWith is a Function - ✔ Returns true for two objects with similar values, based on the provided function +# PASS test\JSONToFile\JSONToFile.test.js - Testing maxBy +ok 762 — JSONToFile is a Function - ✔ maxBy is a Function - ✔ Produces the right result with a function - ✔ Produces the right result with a property name +# PASS test\parseCookie\parseCookie.test.js - Testing maxN +ok 763 — parseCookie is a Function +ok 764 — Parses the cookie - ✔ maxN is a Function - ✔ Returns the n maximum elements from the provided array - ✔ Returns the n maximum elements from the provided array +# PASS test\reducedFilter\reducedFilter.test.js - Testing median +ok 765 — reducedFilter is a Function +ok 766 — Filter an array of objects based on a condition while also filtering out unspecified keys. - ✔ median is a Function - ✔ Returns the median of an array of numbers - ✔ Returns the median of an array of numbers +# PASS test\remove\remove.test.js - Testing memoize +ok 767 — remove is a Function +ok 768 — Removes elements from an array for which the given function returns false - ✔ memoize is a Function - ✔ Function works properly - ✔ Function works properly - ✔ Cache stores values +# PASS test\takeRightWhile\takeRightWhile.test.js - Testing merge +ok 769 — takeRightWhile is a Function +ok 770 — Removes elements until the function returns true - ✔ merge is a Function - ✔ Merges two objects +# PASS test\isTypedArray\isTypedArray.test.js - Testing minBy +ok 771 — isTypedArray is a Function - ✔ minBy is a Function - ✔ Produces the right result with a function - ✔ Produces the right result with a property name +# PASS test\get\get.test.js - Testing minN +ok 772 — get is a Function +ok 773 — Retrieve a property indicated by the selector from an object. - ✔ minN is a Function - ✔ Returns the n minimum elements from the provided array - ✔ Returns the n minimum elements from the provided array +# PASS test\getDaysDiffBetweenDates\getDaysDiffBetweenDates.test.js - Testing mostPerformant +ok 774 — getDaysDiffBetweenDates is a Function +ok 775 — Returns the difference in days between two dates - ✔ mostPerformant is a Function - ✔ Tested by @chalarangelo on 16/02/2018 +# PASS test\UUIDGeneratorNode\UUIDGeneratorNode.test.js - Testing negate +ok 776 — UUIDGeneratorNode is a Function +ok 777 — Contains dashes in the proper places +ok 778 — Only contains hexadecimal digits - ✔ negate is a Function - ✔ Negates a predicate function +# PASS test\httpDelete\httpDelete.test.js - Testing nest +ok 779 — httpDelete is a Function - ✔ nest is a Function +# PASS test\percentile\percentile.test.js - Testing nodeListToArray +ok 780 — percentile is a Function +ok 781 — Uses the percentile formula to calculate how many numbers in the given array are less or equal to the given value. - ✔ nodeListToArray is a Function +# PASS test\findLastIndex\findLastIndex.test.js - Testing none +ok 782 — findLastIndex is a Function +ok 783 — Finds last index for which the given function returns true - ✔ none is a Function - ✔ Returns true for arrays with no truthy values - ✔ Returns false for arrays with at least one truthy value - ✔ Returns true with a predicate function - ✔ Returns false with predicate function +# PASS test\symmetricDifference\symmetricDifference.test.js - Testing nthArg +ok 784 — symmetricDifference is a Function +ok 785 — Returns the symmetric difference between two arrays. - ✔ nthArg is a Function - ✔ Returns the nth argument - ✔ Returns undefined if arguments too few - ✔ Works for negative values +# PASS test\delay\delay.test.js - Testing nthElement +ok 786 — delay is a Function +ok 787 — Works as expecting, passing arguments properly - ✔ nthElement is a Function - ✔ Returns the nth element of an array. - ✔ Returns the nth element of an array. +# PASS test\groupBy\groupBy.test.js - Testing objectFromPairs +ok 788 — groupBy is a Function +ok 789 — Groups the elements of an array based on the given function +ok 790 — Groups the elements of an array based on the given function - ✔ objectFromPairs is a Function - ✔ Creates an object from the given key-value pairs. +# PASS test\symmetricDifferenceBy\symmetricDifferenceBy.test.js - Testing objectToPairs +ok 791 — symmetricDifferenceBy is a Function +ok 792 — Returns the symmetric difference between two arrays, after applying the provided function to each array element of both - ✔ objectToPairs is a Function - ✔ Creates an array of key-value pair arrays from an object. +# PASS test\intersectionBy\intersectionBy.test.js - Testing observeMutations +ok 793 — intersectionBy is a Function +ok 794 — Returns a list of elements that exist in both arrays, after applying the provided function to each array element of both - ✔ observeMutations is a Function - ✔ Tested on 09/02/2018 by @chalarangelo +# PASS test\isAnagram\isAnagram.test.js - Testing off +ok 795 — isAnagram is a Function +ok 796 — Checks valid anagram +ok 797 — Works with spaces +ok 798 — Ignores case +ok 799 — Ignores special characters - ✔ off is a Function - ✔ Tested by @chalarangelo on 16/02/2018 +# PASS test\isSimilar\isSimilar.test.js - Testing offset +ok 800 — isSimilar is a Function - ✔ offset is a Function - ✔ Offset of 0 returns the same array. - ✔ Offset > 0 returns the offsetted array. - ✔ Offset < 0 returns the reverse offsetted array. - ✔ Offset greater than the length of the array returns the same array. - ✔ Offset less than the negative length of the array returns the same array. - ✔ Offsetting empty array returns an empty array. +# PASS test\omitBy\omitBy.test.js - Testing omit +ok 801 — omitBy is a Function +ok 802 — Creates an object composed of the properties the given function returns falsey for - ✔ omit is a Function - ✔ Omits the key-value pairs corresponding to the given keys from an object +# PASS test\approximatelyEqual\approximatelyEqual.test.js - Testing omitBy +ok 803 — approximatelyEqual is a Function +ok 804 — Works for PI / 2 +ok 805 — Works for 0.1 + 0.2 === 0.3 +ok 806 — Works for exactly equal values +ok 807 — Works for a custom epsilon - ✔ omitBy is a Function - ✔ Creates an object composed of the properties the given function returns falsey for +# PASS test\tail\tail.test.js - Testing on +ok 808 — tail is a Function +ok 809 — Returns tail +ok 810 — Returns tail - ✔ on is a Function - ✔ Tested by @chalarangelo on 16/02/2018 +# PASS test\initializeArrayWithRangeRight\initializeArrayWithRangeRight.test.js - Testing onUserInputChange +ok 811 — initializeArrayWithRangeRight is a Function - ✔ onUserInputChange is a Function - ✔ Tested by @chalarangelo on 16/02/2018 +# PASS test\isSymbol\isSymbol.test.js - Testing once +ok 812 — isSymbol is a Function +ok 813 — Checks if the given argument is a symbol - ✔ once is a Function - ✔ Tested by @chalarangelo on 16/02/2018 +# PASS test\httpPut\httpPut.test.js - Testing orderBy +ok 814 — httpPut is a Function - ✔ orderBy is a Function - ✔ Returns a sorted array of objects ordered by properties and orders. - ✔ Returns a sorted array of objects ordered by properties and orders. +# PASS test\geometricProgression\geometricProgression.test.js - Testing over +ok 815 — geometricProgression is a Function +ok 816 — Initializes an array containing the numbers in the specified range +ok 817 — Initializes an array containing the numbers in the specified range +ok 818 — Initializes an array containing the numbers in the specified range - ✔ over is a Function - ✔ Applies given functions over multiple arguments +# PASS test\btoa\btoa.test.js - Testing overArgs +ok 819 — btoa is a Function +ok 820 — btoa("foobar") equals "Zm9vYmFy" - ✔ overArgs is a Function - ✔ Invokes the provided function with its arguments transformed +# PASS test\isMap\isMap.test.js - Testing pad +ok 821 — isMap is a Function - ✔ pad is a Function - ✔ cat is padded on both sides - ✔ length of string is 8 - ✔ pads 42 with "0" - ✔ does not truncates if string exceeds length +# PASS test\hammingDistance\hammingDistance.test.js - Testing palindrome +ok 822 — hammingDistance is a Function +ok 823 — retuns hamming disance between 2 values - ✔ palindrome is a Function - ✔ Given string is a palindrome - ✔ Given string is not a palindrome +# PASS test\mapValues\mapValues.test.js - Testing parseCookie +ok 824 — mapValues is a Function +ok 825 — Maps values - ✔ parseCookie is a Function - ✔ Parses the cookie +# PASS test\decapitalize\decapitalize.test.js - Testing partial +ok 826 — decapitalize is a Function +ok 827 — Works with default parameter +ok 828 — Works with second parameter set to true - ✔ partial is a Function - ✔ Prepends arguments +# PASS test\intersection\intersection.test.js - Testing partialRight +ok 829 — intersection is a Function +ok 830 — Returns a list of elements that exist in both arrays - ✔ partialRight is a Function - ✔ Appends arguments +# PASS test\symmetricDifferenceWith\symmetricDifferenceWith.test.js - Testing partition +ok 831 — symmetricDifferenceWith is a Function +ok 832 — Returns the symmetric difference between two arrays, using a provided function as a comparator - ✔ partition is a Function - ✔ Groups the elements into two arrays, depending on the provided function's truthiness for each element. +# PASS test\radsToDegrees\radsToDegrees.test.js - Testing percentile +ok 833 — radsToDegrees is a Function +ok 834 — Returns the appropriate value - ✔ percentile is a Function - ✔ Uses the percentile formula to calculate how many numbers in the given array are less or equal to the given value. +# PASS test\powerset\powerset.test.js - Testing permutations +ok 835 — powerset is a Function +ok 836 — Returns the powerset of a given array of numbers. - ✔ permutations is a Function - ✔ Generates all permutations of an array +# PASS test\UUIDGeneratorBrowser\UUIDGeneratorBrowser.test.js - Testing pick +ok 837 — UUIDGeneratorBrowser is a Function - ✔ pick is a Function - ✔ Picks the key-value pairs corresponding to the given keys from an object. +# PASS test\pipeFunctions\pipeFunctions.test.js - Testing pickBy +ok 838 — pipeFunctions is a Function +ok 839 — Performs left-to-right function composition - ✔ pickBy is a Function - ✔ Creates an object composed of the properties the given function returns truthy for. +# PASS test\getType\getType.test.js - Testing pipeAsyncFunctions +ok 840 — getType is a Function +ok 841 — Returns the native type of a value - ✔ pipeAsyncFunctions is a Function - ✔ Produces the appropriate hash - ✔ pipeAsyncFunctions result should be 15 +# PASS test\indexOfAll\indexOfAll.test.js - Testing pipeFunctions +ok 842 — indexOfAll is a Function +ok 843 — Returns all indices of val in an array +ok 844 — Returns all indices of val in an array - ✔ pipeFunctions is a Function - ✔ Performs left-to-right function composition +# PASS test\RGBToHex\RGBToHex.test.js - Testing pluralize +ok 845 — RGBToHex is a Function +ok 846 — Converts the values of RGB components to a color code. - ✔ pluralize is a Function - ✔ Produces the plural of the word - ✔ Produces the singular of the word - ✔ Produces the plural of the word - ✔ Prodices the defined plural of the word - ✔ Works with a dictionary +# PASS test\invertKeyValues\invertKeyValues.test.js - Testing powerset +ok 847 — invertKeyValues is a Function +ok 848 — invertKeyValues({ a: 1, b: 2, c: 1 }) returns { 1: [ 'a', 'c' ], 2: [ 'b' ] } +ok 849 — invertKeyValues({ a: 1, b: 2, c: 1 }, value => 'group' + value) returns { group1: [ 'a', 'c' ], group2: [ 'b' ] } - ✔ powerset is a Function - ✔ Returns the powerset of a given array of numbers. +# PASS test\differenceWith\differenceWith.test.js - Testing prefix +ok 850 — differenceWith is a Function +ok 851 — Filters out all values from an array - ✔ prefix is a Function +# PASS test\defaults\defaults.test.js - Testing prettyBytes +ok 852 — defaults is a Function +ok 853 — Assigns default values for undefined properties - ✔ prettyBytes is a Function - ✔ Converts a number in bytes to a human-readable string. - ✔ Converts a number in bytes to a human-readable string. - ✔ Converts a number in bytes to a human-readable string. +# PASS test\sortedIndexBy\sortedIndexBy.test.js - Testing primes +ok 854 — sortedIndexBy is a Function +ok 855 — Returns the lowest index to insert the element without messing up the list order - ✔ primes is a Function - ✔ Generates primes up to a given number, using the Sieve of Eratosthenes. +# PASS test\size\size.test.js - Testing promisify +ok 856 — size is a Function +ok 857 — Get size of arrays, objects or strings. +ok 858 — Get size of arrays, objects or strings. - ✔ promisify is a Function - ✔ Returns a promise +# PASS test\coalesce\coalesce.test.js - Testing pull +ok 859 — coalesce is a Function +ok 860 — Returns the first non-null/undefined argument - ✔ pull is a Function - ✔ Pulls the specified values +# PASS test\partialRight\partialRight.test.js - Testing pullAtIndex +ok 861 — partialRight is a Function +ok 862 — Appends arguments - ✔ pullAtIndex is a Function - ✔ Pulls the given values - ✔ Pulls the given values +# PASS test\functions\functions.test.js - Testing pullAtValue +ok 863 — functions is a Function +ok 864 — Returns own methods +ok 865 — Returns own and inherited methods - ✔ pullAtValue is a Function - ✔ Pulls the specified values - ✔ Pulls the specified values +# PASS test\binarySearch\binarySearch.test.js - Testing pullBy +ok 866 — binarySearch is a Function +ok 867 — Finds item in array +ok 868 — Returns -1 when not found +ok 869 — Works with empty arrays +ok 870 — Works for one element arrays - ✔ pullBy is a Function - ✔ Pulls the specified values +# PASS test\pluralize\pluralize.test.js - Testing quickSort +ok 871 — pluralize is a Function +ok 872 — Produces the plural of the word +ok 873 — Produces the singular of the word +ok 874 — Produces the plural of the word +ok 875 — Prodices the defined plural of the word +ok 876 — Works with a dictionary - ✔ quickSort is a Function - ✔ quickSort([5, 6, 4, 3, 1, 2]) returns [1, 2, 3, 4, 5, 6] - ✔ quickSort([-1, 0, -2]) returns [-2, -1, 0] - ✔ quickSort() throws an error - ✔ quickSort(123) throws an error - ✔ quickSort({ 234: string}) throws an error - ✔ quickSort(null) throws an error - ✔ quickSort(undefined) throws an error - ✔ quickSort([11, 1, 324, 23232, -1, 53, 2, 524, 32, 13, 156, 133, 62, 12, 4]) takes less than 2s to run +# PASS test\nthElement\nthElement.test.js - Testing radsToDegrees +ok 877 — nthElement is a Function +ok 878 — Returns the nth element of an array. +ok 879 — Returns the nth element of an array. - ✔ radsToDegrees is a Function - ✔ Returns the appropriate value +# PASS test\truncateString\truncateString.test.js - Testing randomHexColorCode +ok 880 — truncateString is a Function +ok 881 — Truncates a "boomerang" up to a specified length. - ✔ randomHexColorCode is a Function - ✔ should be equal - ✔ The color code starts with "#" - ✔ The color code contains only valid hex-digits +# PASS test\mapKeys\mapKeys.test.js - Testing randomIntArrayInRange +ok 882 — mapKeys is a Function +ok 883 — Maps keys - ✔ randomIntArrayInRange is a Function - ✔ The returned array contains only integers - ✔ The returned array has the proper length - ✔ The returned array's values lie between provided lowerLimit and upperLimit (both inclusive). +# PASS test\permutations\permutations.test.js - Testing randomIntegerInRange +ok 884 — permutations is a Function +ok 885 — Generates all permutations of an array - ✔ randomIntegerInRange is a Function - ✔ The returned value is an integer - ✔ The returned value lies between provided lowerLimit and upperLimit (both inclusive). +# PASS test\bifurcate\bifurcate.test.js - Testing randomNumberInRange +ok 886 — bifurcate is a Function +ok 887 — Splits the collection into two groups - ✔ randomNumberInRange is a Function - ✔ The returned value is a number - ✔ The returned value lies between provided lowerLimit and upperLimit (both inclusive). +# PASS test\httpPost\httpPost.test.js - Testing readFileLines +ok 888 — httpPost is a Function - ✔ readFileLines is a Function - ✔ Tested on 09/02/2018 by @chalarangelo +# PASS test\detectDeviceType\detectDeviceType.test.js - Testing rearg +ok 889 — detectDeviceType is a Function - ✔ rearg is a Function - ✔ Reorders arguments in invoked function +# PASS test\join\join.test.js - Testing recordAnimationFrames +ok 890 — join is a Function +ok 891 — Joins all elements of an array into a string and returns this string +ok 892 — Joins all elements of an array into a string and returns this string +ok 893 — Joins all elements of an array into a string and returns this string - ✔ recordAnimationFrames is a Function +# PASS test\differenceBy\differenceBy.test.js - Testing redirect +ok 894 — differenceBy is a Function +ok 895 — Works using a native function and numbers +ok 896 — Works with arrow function and objects - ✔ redirect is a Function - ✔ Tested on 09/02/2018 by @chalarangelo +# PASS test\isDivisible\isDivisible.test.js - Testing reduceSuccessive +ok 897 — isDivisible is a Function +ok 898 — The number 6 is divisible by 3 - ✔ reduceSuccessive is a Function - ✔ Returns the array of successively reduced values +# PASS test\escapeRegExp\escapeRegExp.test.js - Testing reduceWhich +ok 899 — escapeRegExp is a Function +ok 900 — Escapes a string to use in a regular expression - ✔ reduceWhich is a Function - ✔ Returns the minimum of an array - ✔ Returns the maximum of an array - ✔ Returns the object with the minimum specified value in an array +# PASS test\untildify\untildify.test.js - Testing reducedFilter +ok 901 — untildify is a Function +ok 902 — Contains no tildes +ok 903 — Does not alter the rest of the path +ok 904 — Does not alter paths without tildes - ✔ reducedFilter is a Function - ✔ Filter an array of objects based on a condition while also filtering out unspecified keys. +# PASS test\solveRPN\solveRPN.test.js - Testing reject +ok 905 — solveRPN is a Function - ✔ reject is a Function - ✔ should be equivalent - ✔ should be equivalent +# PASS test\isObject\isObject.test.js - Testing remove +ok 906 — isObject is a Function +ok 907 — isObject([1, 2, 3, 4]) is a object +ok 908 — isObject([]) is a object +ok 909 — isObject({ a:1 }) is a object +ok 910 — isObject(true) is not a object - ✔ remove is a Function - ✔ Removes elements from an array for which the given function returns false +# PASS test\onUserInputChange\onUserInputChange.test.js - Testing removeNonASCII +ok 911 — onUserInputChange is a Function - ✔ removeNonASCII is a Function - ✔ Removes non-ASCII characters +# PASS test\lcm\lcm.test.js - Testing removeVowels +ok 912 — lcm is a Function +ok 913 — Returns the least common multiple of two or more numbers. +ok 914 — Returns the least common multiple of two or more numbers. - ✔ removeVowels is a Function +# PASS test\partial\partial.test.js - Testing renameKeys +ok 915 — partial is a Function +ok 916 — Prepends arguments - ✔ renameKeys is a Function - ✔ should be equivalent +# PASS test\capitalize\capitalize.test.js - Testing reverseString +ok 917 — capitalize is a Function +ok 918 — Capitalizes the first letter of a string +ok 919 — Capitalizes the first letter of a string +ok 920 — Works with characters +ok 921 — "Works with single character words - ✔ reverseString is a Function - ✔ Reverses a string. +# PASS test\ary\ary.test.js - Testing round +ok 922 — ary is a Function +ok 923 — Discards arguments with index >=n - ✔ round is a Function - ✔ round(1.005, 2) returns 1.01 - ✔ round(123.3423345345345345344, 11) returns 123.34233453453 - ✔ round(3.342, 11) returns 3.342 - ✔ round(1.005) returns 1 - ✔ round([1.005, 2]) returns NaN - ✔ round(string) returns NaN - ✔ round() returns NaN - ✔ round(132, 413, 4134) returns NaN - ✔ round({a: 132}, 413) returns NaN - ✔ round(123.3423345345345345344, 11) takes less than 2s to run +# PASS test\prefix\prefix.test.js - Testing runAsync +ok 924 — prefix is a Function - ✔ runAsync is a Function - ✔ Tested on 09/02/2018 by @chalarangelo +# PASS test\pullBy\pullBy.test.js - Testing runPromisesInSeries +ok 925 — pullBy is a Function +ok 926 — Pulls the specified values - ✔ runPromisesInSeries is a Function +# PASS test\createEventHub\createEventHub.test.js - Testing sample +ok 927 — createEventHub is a Function - ✔ sample is a Function - ✔ Returns a random element from the array - ✔ Works for single-element arrays - ✔ Returns undefined for empty array +# PASS test\isNull\isNull.test.js - Testing sampleSize +ok 928 — isNull is a Function +ok 929 — passed argument is a null +ok 930 — passed argument is a null - ✔ sampleSize is a Function - ✔ Returns a single element without n specified - ✔ Returns a random sample of specified size from an array - ✔ Returns all elements in an array if n >= length - ✔ Returns an empty array if original array is empty - ✔ Returns an empty array if n = 0 +# PASS test\mask\mask.test.js - Testing scrollToTop +ok 931 — mask is a Function +ok 932 — Replaces all but the last num of characters with the specified mask character +ok 933 — Replaces all but the last num of characters with the specified mask character +ok 934 — Replaces all but the last num of characters with the specified mask character - ✔ scrollToTop is a Function - ✔ Tested on 09/02/2018 by @chalarangelo +# PASS test\runAsync\runAsync.test.js - Testing sdbm +ok 935 — runAsync is a Function - ✔ sdbm is a Function - ✔ Hashes the input string into a whole number. +# PASS test\intersectionWith\intersectionWith.test.js - Testing serializeCookie +ok 936 — intersectionWith is a Function +ok 937 — Returns a list of elements that exist in both arrays, using a provided comparator function - ✔ serializeCookie is a Function - ✔ Serializes the cookie +# PASS test\call\call.test.js - Testing setStyle +ok 938 — call is a Function +ok 939 — Calls function on given object - ✔ setStyle is a Function - ✔ Tested by @chalarangelo on 16/02/2018 +# PASS test\isValidJSON\isValidJSON.test.js - Testing shallowClone +ok 940 — isValidJSON is a Function +ok 941 — {"name":"Adam","age":20} is a valid JSON +ok 942 — {"name":"Adam",age:"20"} is not a valid JSON +ok 943 — null is a valid JSON - ✔ shallowClone is a Function - ✔ Shallow cloning works - ✔ Does not clone deeply +# PASS test\nest\nest.test.js - Testing show +ok 944 — nest is a Function - ✔ show is a Function - ✔ Tested by @chalarangelo on 16/02/2018 +# PASS test\pull\pull.test.js - Testing shuffle +ok 945 — pull is a Function +ok 946 — Pulls the specified values - ✔ shuffle is a Function - ✔ Shuffles the array - ✔ New array contains all original elements - ✔ Works for empty arrays - ✔ Works for single-element arrays +# PASS test\rearg\rearg.test.js - Testing similarity +ok 947 — rearg is a Function +ok 948 — Reorders arguments in invoked function - ✔ similarity is a Function - ✔ Returns an array of elements that appear in both arrays. +# PASS test\httpGet\httpGet.test.js - Testing size +ok 949 — httpGet is a Function - ✔ size is a Function - ✔ Get size of arrays, objects or strings. - ✔ Get size of arrays, objects or strings. +# PASS test\initializeNDArray\initializeNDArray.test.js - Testing sleep +ok 950 — initializeNDArray is a Function - ✔ sleep is a Function +# PASS test\removeNonASCII\removeNonASCII.test.js - Testing smoothScroll +ok 951 — removeNonASCII is a Function +ok 952 — Removes non-ASCII characters - ✔ smoothScroll is a Function +# PASS test\fibonacciCountUntilNum\fibonacciCountUntilNum.test.js - Testing solveRPN +ok 953 — fibonacciCountUntilNum is a Function - ✔ solveRPN is a Function +# PASS test\hashBrowser\hashBrowser.test.js - Testing sortCharactersInString +ok 954 — hashBrowser is a Function - ✔ sortCharactersInString is a Function - ✔ Alphabetically sorts the characters in a string. +# PASS test\URLJoin\URLJoin.test.js - Testing sortedIndex +ok 955 — URLJoin is a Function +ok 956 — Returns proper URL +ok 957 — Returns proper URL - ✔ sortedIndex is a Function - ✔ Returns the lowest index at which value should be inserted into array in order to maintain its sort order. - ✔ Returns the lowest index at which value should be inserted into array in order to maintain its sort order. +# PASS test\getColonTimeFromDate\getColonTimeFromDate.test.js - Testing sortedIndexBy +ok 958 — getColonTimeFromDate is a Function - ✔ sortedIndexBy is a Function - ✔ Returns the lowest index to insert the element without messing up the list order +# PASS test\compose\compose.test.js - Testing sortedLastIndex +ok 959 — compose is a Function +ok 960 — Performs right-to-left function composition - ✔ sortedLastIndex is a Function - ✔ Returns the highest index to insert the element without messing up the list order +# PASS test\sdbm\sdbm.test.js - Testing sortedLastIndexBy +ok 961 — sdbm is a Function +ok 962 — Hashes the input string into a whole number. - ✔ sortedLastIndexBy is a Function - ✔ Returns the highest index to insert the element without messing up the list order +# PASS test\chainAsync\chainAsync.test.js - Testing speechSynthesis +ok 963 — chainAsync is a Function +ok 964 — Calls all functions in an array - ✔ speechSynthesis is a Function +# PASS test\counter\counter.test.js - Testing splitLines +ok 965 — counter is a Function - ✔ splitLines is a Function - ✔ Splits a multiline string into an array of lines. +# PASS test\isRegExp\isRegExp.test.js - Testing spreadOver +ok 966 — isRegExp is a Function - ✔ spreadOver is a Function - ✔ Takes a variadic function and returns a closure that accepts an array of arguments to map to the inputs of the function. +# PASS test\isPlainObject\isPlainObject.test.js - Testing stableSort +ok 967 — isPlainObject is a Function +ok 968 — Returns true for a plain object +ok 969 — Returns false for a Map (example of non-plain object) - ✔ stableSort is a Function - ✔ Array is properly sorted +# PASS test\scrollToTop\scrollToTop.test.js - Testing standardDeviation +ok 970 — scrollToTop is a Function - ✔ standardDeviation is a Function - ✔ Returns the standard deviation of an array of numbers - ✔ Returns the standard deviation of an array of numbers +# PASS test\unionBy\unionBy.test.js - Testing stringPermutations +ok 971 — unionBy is a Function +ok 972 — Produces the appropriate results - ✔ stringPermutations is a Function - ✔ Generates all stringPermutations of a string - ✔ Works for single-letter strings - ✔ Works for empty strings +# PASS test\createElement\createElement.test.js - Testing stripHTMLTags +ok 973 — createElement is a Function - ✔ stripHTMLTags is a Function - ✔ Removes HTML tags +# PASS test\hz\hz.test.js - Testing sum +ok 974 — hz is a Function - ✔ sum is a Function - ✔ Returns the sum of two or more numbers/arrays. +# PASS test\defer\defer.test.js - Testing sumBy +ok 975 — defer is a Function - ✔ sumBy is a Function +# PASS test\initializeArrayWithValues\initializeArrayWithValues.test.js - Testing sumPower +ok 976 — initializeArrayWithValues is a Function +ok 977 — Initializes and fills an array with the specified values - ✔ sumPower is a Function - ✔ Returns the sum of the powers of all the numbers from start to end - ✔ Returns the sum of the powers of all the numbers from start to end - ✔ Returns the sum of the powers of all the numbers from start to end +# PASS test\elementIsVisibleInViewport\elementIsVisibleInViewport.test.js - Testing symmetricDifference +ok 978 — elementIsVisibleInViewport is a Function - ✔ symmetricDifference is a Function - ✔ Returns the symmetric difference between two arrays. +# PASS test\stableSort\stableSort.test.js - Testing symmetricDifferenceBy +ok 979 — stableSort is a Function +ok 980 — Array is properly sorted - ✔ symmetricDifferenceBy is a Function - ✔ Returns the symmetric difference between two arrays, after applying the provided function to each array element of both +# PASS test\sortedLastIndex\sortedLastIndex.test.js - Testing symmetricDifferenceWith +ok 981 — sortedLastIndex is a Function +ok 982 — Returns the highest index to insert the element without messing up the list order - ✔ symmetricDifferenceWith is a Function - ✔ Returns the symmetric difference between two arrays, using a provided function as a comparator +# PASS test\isBrowser\isBrowser.test.js - Testing tail +ok 983 — isBrowser is a Function - ✔ tail is a Function - ✔ Returns tail - ✔ Returns tail +# PASS test\smoothScroll\smoothScroll.test.js - Testing take +ok 984 — smoothScroll is a Function - ✔ take is a Function - ✔ Returns an array with n elements removed from the beginning. - ✔ Returns an array with n elements removed from the beginning. +# PASS test\attempt\attempt.test.js - Testing takeRight +ok 985 — attempt is a Function +ok 986 — Returns a value +ok 987 — Returns an error - ✔ takeRight is a Function - ✔ Returns an array with n elements removed from the end - ✔ Returns an array with n elements removed from the end +# PASS test\getMeridiemSuffixOfInteger\getMeridiemSuffixOfInteger.test.js - Testing takeRightWhile +ok 988 — getMeridiemSuffixOfInteger is a Function - ✔ takeRightWhile is a Function - ✔ Removes elements until the function returns true +1..988 - Testing takeWhile +# Test Suites: 100% ██████████, 331 passed, 331 total +# Tests: 100% ██████████, 988 passed, 988 total +# Time: 7.420s, estimated 5s - ✔ takeWhile is a Function - ✔ Removes elements until the function returns true +# Ran all test suites. - Testing throttle - - ✔ throttle is a Function - ✔ Tested by @chalarangelo on 16/02/2018 - - Testing timeTaken - - ✔ timeTaken is a Function - ✔ Tested by @chalarangelo on 16/02/2018 - - Testing times - - ✔ times is a Function - ✔ Runs a function the specified amount of times - - Testing toCamelCase - - ✔ toCamelCase is a Function - ✔ toCamelCase('some_database_field_name') returns someDatabaseFieldName - ✔ toCamelCase('Some label that needs to be camelized') returns someLabelThatNeedsToBeCamelized - ✔ toCamelCase('some-javascript-property') return someJavascriptProperty - ✔ toCamelCase('some-mixed_string with spaces_underscores-and-hyphens') returns someMixedStringWithSpacesUnderscoresAndHyphens - ✔ toCamelCase() throws a error - ✔ toCamelCase([]) throws a error - ✔ toCamelCase({}) throws a error - ✔ toCamelCase(123) throws a error - ✔ toCamelCase(some-mixed_string with spaces_underscores-and-hyphens) takes less than 2s to run - - Testing toCurrency - - ✔ toCurrency is a Function - - ✖ currency: Euro | currencyLangFormat: Local - --------------------------------------------- - operator: equal - expected: '€ 123,456.79' - actual: '€123,456.79' - at: Test.test (/home/travis/build/Chalarangelo/30-seconds-of-code/test/toCurrency/toCurrency.test.js:8:5) - stack: |- - - ✔ currency: US Dollar | currencyLangFormat: English (United States) - - ✖ currency: Japanese Yen | currencyLangFormat: Local - ----------------------------------------------------- - operator: equal - expected: 'JP¥ 322,342,436,423' - actual: '¥322,342,436,423' - at: Test.test (/home/travis/build/Chalarangelo/30-seconds-of-code/test/toCurrency/toCurrency.test.js:11:5) - stack: |- - - - Testing toDecimalMark - - ✔ toDecimalMark is a Function - ✔ convert a float-point arithmetic to the Decimal mark form - - Testing toHash - - ✔ toHash is a Function - - Testing toKebabCase - - ✔ toKebabCase is a Function - ✔ toKebabCase('camelCase') returns camel-case - ✔ toKebabCase('some text') returns some-text - ✔ toKebabCase('some-mixed-string With spaces-underscores-and-hyphens') returns some-mixed-string-with-spaces-underscores-and-hyphens - ✔ toKebabCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML') returns i-am-listening-to-fm-while-loading-different-url-on-my-browser-and-also-editing-some-xml-and-html - ✔ toKebabCase() return undefined - ✔ toKebabCase([]) throws an error - ✔ toKebabCase({}) throws an error - ✔ toKebabCase(123) throws an error - ✔ toKebabCase(IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML) takes less than 2s to run - - Testing toOrdinalSuffix - - ✔ toOrdinalSuffix is a Function - ✔ Adds an ordinal suffix to a number - ✔ Adds an ordinal suffix to a number - ✔ Adds an ordinal suffix to a number - ✔ Adds an ordinal suffix to a number - - Testing toSafeInteger - - ✔ toSafeInteger is a Function - ✔ Number(toSafeInteger(3.2)) is a number - ✔ Converts a value to a safe integer - ✔ toSafeInteger('4.2') returns 4 - ✔ toSafeInteger(4.6) returns 5 - ✔ toSafeInteger([]) returns 0 - ✔ isNaN(toSafeInteger([1.5, 3124])) is true - ✔ isNaN(toSafeInteger('string')) is true - ✔ isNaN(toSafeInteger({})) is true - ✔ isNaN(toSafeInteger()) is true - ✔ toSafeInteger(Infinity) returns 9007199254740991 - ✔ toSafeInteger(3.2) takes less than 2s to run - - Testing toSnakeCase - - ✔ toSnakeCase is a Function - ✔ toSnakeCase('camelCase') returns camel_case - ✔ toSnakeCase('some text') returns some_text - ✔ toSnakeCase('some-mixed_string With spaces_underscores-and-hyphens') returns some_mixed_string_with_spaces_underscores_and_hyphens - ✔ toSnakeCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML') returns i_am_listening_to_fm_while_loading_different_url_on_my_browser_and_also_editing_some_xml_and_html - ✔ toSnakeCase() returns undefined - ✔ toSnakeCase([]) throws an error - ✔ toSnakeCase({}) throws an error - ✔ toSnakeCase(123) throws an error - ✔ toSnakeCase(IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML) takes less than 2s to run - - Testing toggleClass - - ✔ toggleClass is a Function - ✔ Tested by @chalarangelo on 16/02/2018 - - Testing tomorrow - - ✔ tomorrow is a Function - ✔ Returns the correct year - ✔ Returns the correct month - ✔ Returns the correct date - - Testing transform - - ✔ transform is a Function - ✔ Transforms an object - - Testing truncateString - - ✔ truncateString is a Function - ✔ Truncates a "boomerang" up to a specified length. - - Testing truthCheckCollection - - ✔ truthCheckCollection is a Function - ✔ second argument is truthy on all elements of a collection - - Testing unary - - ✔ unary is a Function - ✔ Discards arguments after the first one - - Testing uncurry - - ✔ uncurry is a Function - ✔ Works without a provided value for n - ✔ Works without n = 2 - ✔ Works withoutn = 3 - - Testing unescapeHTML - - ✔ unescapeHTML is a Function - ✔ Unescapes escaped HTML characters. - - Testing unflattenObject - - ✔ unflattenObject is a Function - ✔ Unflattens an object with the paths for keys - - Testing unfold - - ✔ unfold is a Function - ✔ Works with a given function, producing an array - - Testing union - - ✔ union is a Function - ✔ union([1, 2, 3], [4, 3, 2]) returns [1, 2, 3, 4] - ✔ union('str', 'asd') returns [ 's', 't', 'r', 'a', 'd' ] - ✔ union([[], {}], [1, 2, 3]) returns [[], {}, 1, 2, 3] - ✔ union([], []) returns [] - ✔ union() throws an error - ✔ union(true, str) throws an error - ✔ union(false, true) throws an error - ✔ union(123, {}) throws an error - ✔ union([], {}) throws an error - ✔ union(undefined, null) throws an error - ✔ union([1, 2, 3], [4, 3, 2]) takes less than 2s to run - - Testing unionBy - - ✔ unionBy is a Function - ✔ Produces the appropriate results - - Testing unionWith - - ✔ unionWith is a Function - ✔ Produces the appropriate results - - Testing uniqueElements - - ✔ uniqueElements is a Function - ✔ uniqueElements([1, 2, 2, 3, 4, 4, 5]) returns [1,2,3,4,5] - ✔ uniqueElements([1, 23, 53]) returns [1, 23, 53] - ✔ uniqueElements([true, 0, 1, false, false, undefined, null, '']) returns [true, 0, 1, false, false, undefined, null, ''] - ✔ uniqueElements() returns [] - ✔ uniqueElements(null) returns [] - ✔ uniqueElements(undefined) returns [] - ✔ uniqueElements('strt') returns ['s', 't', 'r'] - ✔ uniqueElements(1, 1, 2543, 534, 5) throws an error - ✔ uniqueElements({}) throws an error - ✔ uniqueElements(true) throws an error - ✔ uniqueElements(false) throws an error - ✔ uniqueElements([true, 0, 1, false, false, undefined, null]) takes less than 2s to run - - Testing untildify - - ✔ untildify is a Function - ✔ Contains no tildes - ✔ Does not alter the rest of the path - ✔ Does not alter paths without tildes - - Testing unzip - - ✔ unzip is a Function - ✔ unzip([['a', 1, true], ['b', 2, false]]) equals [['a', 'b'], [1, 2], [true, false]] - ✔ unzip([['a', 1, true], ['b', 2]]) equals [['a', 'b'], [1, 2], [true]] - - Testing unzipWith - - ✔ unzipWith is a Function - ✔ unzipWith([[1, 10, 100], [2, 20, 200]], (...args) => args.reduce((acc, v) => acc + v, 0)) equals [3, 30, 300] - - Testing validateNumber - - ✔ validateNumber is a Function - ✔ validateNumber(9) returns true - ✔ validateNumber(234asd.slice(0, 2)) returns true - ✔ validateNumber(1232) returns true - ✔ validateNumber(1232 + 13423) returns true - ✔ validateNumber(1232 * 2342 * 123) returns true - ✔ validateNumber(1232.23423536) returns true - ✔ validateNumber(234asd) returns false - ✔ validateNumber(e234d) returns false - ✔ validateNumber(false) returns false - ✔ validateNumber(true) returns false - ✔ validateNumber(null) returns false - ✔ validateNumber(123 * asd) returns false - - Testing when - - ✔ when is a Function - ✔ should be truthy - ✔ should be truthy - - Testing without - - ✔ without is a Function - ✔ without([2, 1, 2, 3], 1, 2) returns [3] - ✔ without([]) returns [] - ✔ without([3, 1, true, '3', true], '3', true) returns [3, 1] - ✔ without('string'.split(''), 's', 't', 'g') returns ['r', 'i', 'n'] - ✔ without() throws an error - ✔ without(null) throws an error - ✔ without(undefined) throws an error - ✔ without() throws an error - ✔ without({}) throws an error - - Testing words - - ✔ words is a Function - ✔ words('I love javaScript!!') returns [I, love, javaScript] - ✔ words('python, javaScript & coffee') returns [python, javaScript, coffee] - ✔ words(I love javaScript!!) returns an array - ✔ words() throws a error - ✔ words(null) throws a error - ✔ words(undefined) throws a error - ✔ words({}) throws a error - ✔ words([]) throws a error - ✔ words(1234) throws a error - - Testing xProd - - ✔ xProd is a Function - ✔ xProd([1, 2], ['a', 'b']) returns [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] - - Testing yesNo - - ✔ yesNo is a Function - ✔ yesNo(Y) returns true - ✔ yesNo(yes) returns true - ✔ yesNo(foo, true) returns true - ✔ yesNo(No) returns false - ✔ yesNo() returns false - ✔ yesNo(null) returns false - ✔ yesNo(undefined) returns false - ✔ yesNo([123, null]) returns false - ✔ yesNo([Yes, No]) returns false - ✔ yesNo({ 2: Yes }) returns false - ✔ yesNo([Yes, No], true) returns true - ✔ yesNo({ 2: Yes }, true) returns true - - Testing zip - - ✔ zip is a Function - ✔ zip([a, b], [1, 2], [true, false]) returns [[a, 1, true], [b, 2, false]] - ✔ zip([a], [1, 2], [true, false]) returns [[a, 1, true], [undefined, 2, false]] - ✔ zip([]) returns [] - ✔ zip(123) returns [] - ✔ zip([a, b], [1, 2], [true, false]) returns an Array - ✔ zip([a], [1, 2], [true, false]) returns an Array - ✔ zip(null) throws an error - ✔ zip(undefined) throws an error - - Testing zipObject - - ✔ zipObject is a Function - ✔ zipObject([a, b, c], [1, 2]) returns {a: 1, b: 2, c: undefined} - ✔ zipObject([a, b], [1, 2, 3]) returns {a: 1, b: 2} - ✔ zipObject([a, b, c], string) returns { a: s, b: t, c: r } - ✔ zipObject([a], string) returns { a: s } - ✔ zipObject() throws an error - ✔ zipObject([string], null) throws an error - ✔ zipObject(null, [1]) throws an error - ✔ zipObject(string) throws an error - ✔ zipObject(test, string) throws an error - - Testing zipWith - - ✔ zipWith is a Function - ✔ Sends a GET request - ✔ Sends a POST request - ✔ Runs the function provided - ✔ Runs promises in series - ✔ Works as expecting, passing arguments properly - ✔ Works with multiple promises - - - - Failed Tests: There were 2 failures - - Testing toCurrency - - ✖ currency: Euro | currencyLangFormat: Local - ✖ currency: Japanese Yen | currencyLangFormat: Local - - - total: 1022 - passing: 1020 - failing: 2 - duration: 2.4s - - -undefined \ No newline at end of file diff --git a/test/throttle/throttle.test.js b/test/throttle/throttle.test.js index fcd88a603..6f73087c6 100644 --- a/test/throttle/throttle.test.js +++ b/test/throttle/throttle.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const throttle = require('./throttle.js'); -test('Testing throttle', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof throttle === 'function', 'throttle is a Function'); - t.pass('Tested by @chalarangelo on 16/02/2018'); - //t.deepEqual(throttle(args..), 'Expected'); - //t.equal(throttle(args..), 'Expected'); - //t.false(throttle(args..), 'Expected'); - //t.throws(throttle(args..), 'Expected'); - t.end(); +test('throttle is a Function', () => { + expect(throttle).toBeInstanceOf(Function); }); diff --git a/test/timeTaken/timeTaken.test.js b/test/timeTaken/timeTaken.test.js index fd72e9d13..fe67c4284 100644 --- a/test/timeTaken/timeTaken.test.js +++ b/test/timeTaken/timeTaken.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const timeTaken = require('./timeTaken.js'); -test('Testing timeTaken', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof timeTaken === 'function', 'timeTaken is a Function'); - t.pass('Tested by @chalarangelo on 16/02/2018'); - //t.deepEqual(timeTaken(args..), 'Expected'); - //t.equal(timeTaken(args..), 'Expected'); - //t.false(timeTaken(args..), 'Expected'); - //t.throws(timeTaken(args..), 'Expected'); - t.end(); +test('timeTaken is a Function', () => { + expect(timeTaken).toBeInstanceOf(Function); }); diff --git a/test/times/times.test.js b/test/times/times.test.js index dcf2d7e28..e5108af66 100644 --- a/test/times/times.test.js +++ b/test/times/times.test.js @@ -1,16 +1,11 @@ -const test = require('tape'); +const expect = require('expect'); const times = require('./times.js'); -test('Testing times', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof times === 'function', 'times is a Function'); - var output = ''; - times(5, i => (output += i)); - t.equals(output, '01234', 'Runs a function the specified amount of times'); - //t.deepEqual(times(args..), 'Expected'); - //t.equal(times(args..), 'Expected'); - //t.false(times(args..), 'Expected'); - //t.throws(times(args..), 'Expected'); - t.end(); +test('times is a Function', () => { + expect(times).toBeInstanceOf(Function); +}); +var output = ''; +times(5, i => (output += i)); +test('Runs a function the specified amount of times', () => { + expect(output).toBe('01234'); }); diff --git a/test/toCamelCase/toCamelCase.test.js b/test/toCamelCase/toCamelCase.test.js index 0f3efc557..1443c9c98 100644 --- a/test/toCamelCase/toCamelCase.test.js +++ b/test/toCamelCase/toCamelCase.test.js @@ -1,22 +1,36 @@ -const test = require('tape'); +const expect = require('expect'); const toCamelCase = require('./toCamelCase.js'); -test('Testing toCamelCase', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof toCamelCase === 'function', 'toCamelCase is a Function'); - t.equal(toCamelCase('some_database_field_name'), 'someDatabaseFieldName', "toCamelCase('some_database_field_name') returns someDatabaseFieldName"); - t.equal(toCamelCase('Some label that needs to be camelized'), 'someLabelThatNeedsToBeCamelized', "toCamelCase('Some label that needs to be camelized') returns someLabelThatNeedsToBeCamelized"); - t.equal(toCamelCase('some-javascript-property'), 'someJavascriptProperty', "toCamelCase('some-javascript-property') return someJavascriptProperty"); - t.equal(toCamelCase('some-mixed_string with spaces_underscores-and-hyphens'), 'someMixedStringWithSpacesUnderscoresAndHyphens', "toCamelCase('some-mixed_string with spaces_underscores-and-hyphens') returns someMixedStringWithSpacesUnderscoresAndHyphens"); - t.throws(() => toCamelCase(), 'toCamelCase() throws a error'); - t.throws(() => toCamelCase([]), 'toCamelCase([]) throws a error'); - t.throws(() => toCamelCase({}), 'toCamelCase({}) throws a error'); - t.throws(() => toCamelCase(123), 'toCamelCase(123) throws a error'); - - let start = new Date().getTime(); - toCamelCase('some-mixed_string with spaces_underscores-and-hyphens'); - let end = new Date().getTime(); - t.true((end - start) < 2000, 'toCamelCase(some-mixed_string with spaces_underscores-and-hyphens) takes less than 2s to run'); - t.end(); +test('toCamelCase is a Function', () => { + expect(toCamelCase).toBeInstanceOf(Function); +}); +test('toCamelCase(\'some_database_field_name\') returns someDatabaseFieldName', () => { + expect(toCamelCase('some_database_field_name')).toBe('someDatabaseFieldName'); +}); +test('toCamelCase(\'Some label that needs to be camelized\') returns someLabelThatNeedsToBeCamelized', () => { + expect(toCamelCase('Some label that needs to be camelized')).toBe('someLabelThatNeedsToBeCamelized'); +}); +test('toCamelCase(\'some-javascript-property\') return someJavascriptProperty', () => { + expect(toCamelCase('some-javascript-property')).toBe('someJavascriptProperty'); +}); +test('toCamelCase(\'some-mixed_string with spaces_underscores-and-hyphens\') returns someMixedStringWithSpacesUnderscoresAndHyphens', () => { + expect(toCamelCase('some-mixed_string with spaces_underscores-and-hyphens')).toBe('someMixedStringWithSpacesUnderscoresAndHyphens'); +}); +test('toCamelCase() throws a error', () => { + expect(() => {toCamelCase(); }).toThrow(); +}); +test('toCamelCase([]) throws a error', () => { + expect(() => {toCamelCase([]); }).toThrow(); +}); +test('toCamelCase({}) throws a error', () => { + expect(() => {toCamelCase({}); }).toThrow(); +}); +test('toCamelCase(123) throws a error', () => { + expect(() => {toCamelCase(123); }).toThrow(); +}); +let start = new Date().getTime(); +toCamelCase('some-mixed_string with spaces_underscores-and-hyphens'); +let end = new Date().getTime(); +test('toCamelCase(some-mixed_string with spaces_underscores-and-hyphens) takes less than 2s to run', () => { + expect((end - start) < 2000).toBeTruthy(); }); diff --git a/test/toCurrency/toCurrency.test.js b/test/toCurrency/toCurrency.test.js index 16423c0c1..b8fdf0a22 100644 --- a/test/toCurrency/toCurrency.test.js +++ b/test/toCurrency/toCurrency.test.js @@ -1,18 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const toCurrency = require('./toCurrency.js'); -test('Testing toCurrency', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof toCurrency === 'function', 'toCurrency is a Function'); - t.equal(toCurrency(123456.789, 'EUR'), '€ 123,456.79', 'currency: Euro | currencyLangFormat: Local'); - t.equal(toCurrency(123456.789, 'USD', 'en-us'), '$123,456.79', ' currency: US Dollar | currencyLangFormat: English (United States)'); - //t.equal(toCurrency(123456.789, 'USD', 'fa'), '۱۲۳٬۴۵۶٫۷۹ ؜$', 'currency: US Dollar | currencyLangFormat: Farsi'); - These break in node - t.equal(toCurrency(322342436423.2435, 'JPY'), 'JP¥ 322,342,436,423', 'currency: Japanese Yen | currencyLangFormat: Local'); - //t.equal(toCurrency(322342436423.2435, 'JPY', 'fi'), '322 342 436 423 ¥', 'currency: Japanese Yen | currencyLangFormat: Finnish'); - These break in node - //t.deepEqual(toCurrency(args..), 'Expected'); - //t.equal(toCurrency(args..), 'Expected'); - //t.false(toCurrency(args..), 'Expected'); - //t.throws(toCurrency(args..), 'Expected'); - t.end(); +test('toCurrency is a Function', () => { + expect(toCurrency).toBeInstanceOf(Function); +}); +test('currency: Euro | currencyLangFormat: Local', () => { + expect(toCurrency(123456.789, 'EUR')).toEqual(expect.stringMatching(/€\s*123,456.79/g)); +}); +test(' currency: US Dollar | currencyLangFormat: English (United States)', () => { + expect(toCurrency(123456.789, 'USD', 'en-us')).toEqual(expect.stringMatching(/\$\s*123,456.79/g)); +}); +test('currency: Japanese Yen | currencyLangFormat: Local', () => { + expect(toCurrency(322342436423.2435, 'JPY')).toEqual(expect.stringMatching(/J*P*¥\s*322,342,436,423/g)); }); diff --git a/test/toDecimalMark/toDecimalMark.test.js b/test/toDecimalMark/toDecimalMark.test.js index 0da36d864..017f3723c 100644 --- a/test/toDecimalMark/toDecimalMark.test.js +++ b/test/toDecimalMark/toDecimalMark.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const toDecimalMark = require('./toDecimalMark.js'); -test('Testing toDecimalMark', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof toDecimalMark === 'function', 'toDecimalMark is a Function'); - t.equal(toDecimalMark(12305030388.9087), "12,305,030,388.909", "convert a float-point arithmetic to the Decimal mark form"); - //t.deepEqual(toDecimalMark(args..), 'Expected'); - //t.equal(toDecimalMark(args..), 'Expected'); - //t.false(toDecimalMark(args..), 'Expected'); - //t.throws(toDecimalMark(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('toDecimalMark is a Function', () => { + expect(toDecimalMark).toBeInstanceOf(Function); +}); +test('convert a float-point arithmetic to the Decimal mark form', () => { + expect(toDecimalMark(12305030388.9087)).toBe("12,305,030,388.909"); +}); diff --git a/test/toHash/toHash.test.js b/test/toHash/toHash.test.js index a7c2e931f..27c2b4e2a 100644 --- a/test/toHash/toHash.test.js +++ b/test/toHash/toHash.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const toHash = require('./toHash.js'); -test('Testing toHash', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof toHash === 'function', 'toHash is a Function'); - //t.deepEqual(toHash(args..), 'Expected'); - //t.equal(toHash(args..), 'Expected'); - //t.false(toHash(args..), 'Expected'); - //t.throws(toHash(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('toHash is a Function', () => { + expect(toHash).toBeInstanceOf(Function); +}); diff --git a/test/toKebabCase/toKebabCase.test.js b/test/toKebabCase/toKebabCase.test.js index ab360940d..c3fcc36b4 100644 --- a/test/toKebabCase/toKebabCase.test.js +++ b/test/toKebabCase/toKebabCase.test.js @@ -1,22 +1,36 @@ -const test = require('tape'); +const expect = require('expect'); const toKebabCase = require('./toKebabCase.js'); -test('Testing toKebabCase', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof toKebabCase === 'function', 'toKebabCase is a Function'); - t.equal(toKebabCase('camelCase'), 'camel-case', "toKebabCase('camelCase') returns camel-case"); - t.equal(toKebabCase('some text'), 'some-text', "toKebabCase('some text') returns some-text"); - t.equal(toKebabCase('some-mixed-string With spaces-underscores-and-hyphens'), 'some-mixed-string-with-spaces-underscores-and-hyphens', "toKebabCase('some-mixed-string With spaces-underscores-and-hyphens') returns some-mixed-string-with-spaces-underscores-and-hyphens"); - t.equal(toKebabCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML'), 'i-am-listening-to-fm-while-loading-different-url-on-my-browser-and-also-editing-some-xml-and-html', "toKebabCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML') returns i-am-listening-to-fm-while-loading-different-url-on-my-browser-and-also-editing-some-xml-and-html"); - t.equal(toKebabCase(), undefined, 'toKebabCase() return undefined'); - t.throws(() => toKebabCase([]), 'toKebabCase([]) throws an error'); - t.throws(() => toKebabCase({}), 'toKebabCase({}) throws an error'); - t.throws(() => toKebabCase(123), 'toKebabCase(123) throws an error'); - - let start = new Date().getTime(); - toKebabCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML'); - let end = new Date().getTime(); - t.true((end - start) < 2000, 'toKebabCase(IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML) takes less than 2s to run'); - t.end(); +test('toKebabCase is a Function', () => { + expect(toKebabCase).toBeInstanceOf(Function); +}); +test('toKebabCase(\'camelCase\') returns camel-case', () => { + expect(toKebabCase('camelCase')).toBe('camel-case'); +}); +test('toKebabCase(\'some text\') returns some-text', () => { + expect(toKebabCase('some text')).toBe('some-text'); +}); +test('toKebabCase(\'some-mixed-string With spaces-underscores-and-hyphens\') returns some-mixed-string-with-spaces-underscores-and-hyphens', () => { + expect(toKebabCase('some-mixed-string With spaces-underscores-and-hyphens')).toBe('some-mixed-string-with-spaces-underscores-and-hyphens'); +}); +test('toKebabCase(\'IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML\') returns i-am-listening-to-fm-while-loading-different-url-on-my-browser-and-also-editing-some-xml-and-html', () => { + expect(toKebabCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML')).toBe('i-am-listening-to-fm-while-loading-different-url-on-my-browser-and-also-editing-some-xml-and-html'); +}); +test('toKebabCase() returns undefined', () => { + expect(toKebabCase()).toBe(undefined); +}); +test('toKebabCase([]) throws an erro', () => { + expect(() => { toKebabCase([]); }).toThrow(); +}); +test('toKebabCase({}) throws an erro', () => { + expect(() => { toKebabCase({}); }).toThrow(); +}); +test('toKebabCase(123) throws an erro', () => { + expect(() => { toKebabCase(123); }).toThrow(); +}); +let start = new Date().getTime(); +toKebabCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML'); +let end = new Date().getTime(); +test('toKebabCase(IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML) takes less than 2s to run', () => { + expect((end - start) < 2000).toBeTruthy(); }); diff --git a/test/toOrdinalSuffix/toOrdinalSuffix.test.js b/test/toOrdinalSuffix/toOrdinalSuffix.test.js index a58c7cf64..8bdcb11ac 100644 --- a/test/toOrdinalSuffix/toOrdinalSuffix.test.js +++ b/test/toOrdinalSuffix/toOrdinalSuffix.test.js @@ -1,18 +1,18 @@ -const test = require('tape'); +const expect = require('expect'); const toOrdinalSuffix = require('./toOrdinalSuffix.js'); -test('Testing toOrdinalSuffix', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof toOrdinalSuffix === 'function', 'toOrdinalSuffix is a Function'); - t.equal(toOrdinalSuffix('123'), '123rd', 'Adds an ordinal suffix to a number'); - t.equal(toOrdinalSuffix(5), '5th', 'Adds an ordinal suffix to a number'); - t.equal(toOrdinalSuffix(1), '1st', 'Adds an ordinal suffix to a number'); - t.equal(toOrdinalSuffix(0), '0th', 'Adds an ordinal suffix to a number'); - // t.equal(toOrdinalSuffix(), ,); - //t.deepEqual(toOrdinalSuffix(args..), 'Expected'); - //t.equal(toOrdinalSuffix(args..), 'Expected'); - //t.false(toOrdinalSuffix(args..), 'Expected'); - //t.throws(toOrdinalSuffix(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('toOrdinalSuffix is a Function', () => { + expect(toOrdinalSuffix).toBeInstanceOf(Function); +}); +test('Adds an ordinal suffix to a number', () => { + expect(toOrdinalSuffix('123')).toBe('123rd'); +}); +test('Adds an ordinal suffix to a number', () => { + expect(toOrdinalSuffix(5)).toBe('5th'); +}); +test('Adds an ordinal suffix to a number', () => { + expect(toOrdinalSuffix(1)).toBe('1st'); +}); +test('Adds an ordinal suffix to a number', () => { + expect(toOrdinalSuffix(0)).toBe('0th'); +}); diff --git a/test/toSafeInteger/toSafeInteger.test.js b/test/toSafeInteger/toSafeInteger.test.js index 885f6e324..29901a2b5 100644 --- a/test/toSafeInteger/toSafeInteger.test.js +++ b/test/toSafeInteger/toSafeInteger.test.js @@ -1,24 +1,42 @@ -const test = require('tape'); +const expect = require('expect'); const toSafeInteger = require('./toSafeInteger.js'); -test('Testing toSafeInteger', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof toSafeInteger === 'function', 'toSafeInteger is a Function'); - t.true(Number(toSafeInteger(3.2)), 'Number(toSafeInteger(3.2)) is a number'); - t.equal(toSafeInteger(3.2), 3, "Converts a value to a safe integer"); - t.equal(toSafeInteger('4.2'), 4, "toSafeInteger('4.2') returns 4"); - t.equal(toSafeInteger(4.6), 5, "toSafeInteger(4.6) returns 5"); - t.equal(toSafeInteger([]), 0, "toSafeInteger([]) returns 0"); - t.true(isNaN(toSafeInteger([1.5, 3124])), "isNaN(toSafeInteger([1.5, 3124])) is true"); - t.true(isNaN(toSafeInteger('string')), "isNaN(toSafeInteger('string')) is true"); - t.true(isNaN(toSafeInteger({})), "isNaN(toSafeInteger({})) is true"); - t.true(isNaN(toSafeInteger()), "isNaN(toSafeInteger()) is true"); - t.equal(toSafeInteger(Infinity), 9007199254740991, "toSafeInteger(Infinity) returns 9007199254740991"); - - let start = new Date().getTime(); - toSafeInteger(3.2); - let end = new Date().getTime(); - t.true((end - start) < 2000, 'toSafeInteger(3.2) takes less than 2s to run'); - t.end(); +test('toSafeInteger is a Function', () => { + expect(toSafeInteger).toBeInstanceOf(Function); +}); +test('Number(toSafeInteger(3.2)) is a number', () => { + expect(Number(toSafeInteger(3.2))).toBeTruthy(); +}); +test('Converts a value to a safe integer', () => { + expect(toSafeInteger(3.2)).toBe(3); +}); +test('toSafeInteger(\'4.2\') returns 4', () => { + expect(toSafeInteger('4.2')).toBe(4); +}); +test('toSafeInteger(4.6) returns 5', () => { + expect(toSafeInteger(4.6)).toBe(5); +}); +test('toSafeInteger([]) returns 0', () => { + expect(toSafeInteger([])).toBe(0); +}); +test('isNaN(toSafeInteger([1.5, 3124])) is true', () => { + expect(isNaN(toSafeInteger([1.5, 3124]))).toBeTruthy(); +}); +test('isNaN(toSafeInteger(\'string\')) is true', () => { + expect(isNaN(toSafeInteger('string'))).toBeTruthy(); +}); +test('isNaN(toSafeInteger({})) is true', () => { + expect(isNaN(toSafeInteger({}))).toBeTruthy(); +}); +test('isNaN(toSafeInteger()) is true', () => { + expect(isNaN(toSafeInteger())).toBeTruthy(); +}); +test('toSafeInteger(Infinity) returns 9007199254740991', () => { + expect(toSafeInteger(Infinity)).toBe(9007199254740991); +}); +let start = new Date().getTime(); +toSafeInteger(3.2); +let end = new Date().getTime(); +test('toSafeInteger(3.2) takes less than 2s to run', () => { + expect((end - start) < 2000).toBeTruthy(); }); diff --git a/test/toSnakeCase/toSnakeCase.test.js b/test/toSnakeCase/toSnakeCase.test.js index 72190fda2..5c6ebdeb8 100644 --- a/test/toSnakeCase/toSnakeCase.test.js +++ b/test/toSnakeCase/toSnakeCase.test.js @@ -1,22 +1,36 @@ -const test = require('tape'); +const expect = require('expect'); const toSnakeCase = require('./toSnakeCase.js'); -test('Testing toSnakeCase', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof toSnakeCase === 'function', 'toSnakeCase is a Function'); - t.equal(toSnakeCase('camelCase'), 'camel_case', "toSnakeCase('camelCase') returns camel_case"); - t.equal(toSnakeCase('some text'), 'some_text', "toSnakeCase('some text') returns some_text"); - t.equal(toSnakeCase('some-mixed_string With spaces_underscores-and-hyphens'), 'some_mixed_string_with_spaces_underscores_and_hyphens', "toSnakeCase('some-mixed_string With spaces_underscores-and-hyphens') returns some_mixed_string_with_spaces_underscores_and_hyphens"); - t.equal(toSnakeCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML'), 'i_am_listening_to_fm_while_loading_different_url_on_my_browser_and_also_editing_some_xml_and_html', "toSnakeCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML') returns i_am_listening_to_fm_while_loading_different_url_on_my_browser_and_also_editing_some_xml_and_html"); - t.equal(toSnakeCase(), undefined, 'toSnakeCase() returns undefined'); - t.throws(() => toSnakeCase([]), 'toSnakeCase([]) throws an error'); - t.throws(() => toSnakeCase({}), 'toSnakeCase({}) throws an error'); - t.throws(() => toSnakeCase(123), 'toSnakeCase(123) throws an error'); - - let start = new Date().getTime(); - toSnakeCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML'); - let end = new Date().getTime(); - t.true((end - start) < 2000, 'toSnakeCase(IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML) takes less than 2s to run'); - t.end(); +test('toSnakeCase is a Function', () => { + expect(toSnakeCase).toBeInstanceOf(Function); +}); +test('toSnakeCase(\'camelCase\') returns camel_case', () => { + expect(toSnakeCase('camelCase')).toBe('camel_case'); +}); +test('toSnakeCase(\'some text\') returns some_text', () => { + expect(toSnakeCase('some text')).toBe('some_text'); +}); +test('toSnakeCase(\'some-mixed_string With spaces_underscores-and-hyphens\') returns some_mixed_string_with_spaces_underscores_and_hyphens', () => { + expect(toSnakeCase('some-mixed_string With spaces_underscores-and-hyphens')).toBe('some_mixed_string_with_spaces_underscores_and_hyphens'); +}); +test('toSnakeCase(\'IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML\') returns i_am_listening_to_fm_while_loading_different_url_on_my_browser_and_also_editing_some_xml_and_html', () => { + expect(toSnakeCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML')).toBe('i_am_listening_to_fm_while_loading_different_url_on_my_browser_and_also_editing_some_xml_and_html'); +}); +test('toSnakeCase() returns undefined', () => { + expect(toSnakeCase()).toBe(undefined); +}); +test('toSnakeCase([]) throws an error', () => { + expect(() => {toSnakeCase([]);}).toThrow(); +}); +test('toSnakeCase({}) throws an error', () => { + expect(() => {toSnakeCase({});}).toThrow(); +}); +test('toSnakeCase(123) throws an error', () => { + expect(() => {toSnakeCase(123);}).toThrow(); +}); +let start = new Date().getTime(); +toSnakeCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML'); +let end = new Date().getTime(); +test('toSnakeCase(IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML) takes less than 2s to run', () => { + expect((end - start) < 2000).toBeTruthy(); }); diff --git a/test/toggleClass/toggleClass.test.js b/test/toggleClass/toggleClass.test.js index f0bbe14d6..7c0be8524 100644 --- a/test/toggleClass/toggleClass.test.js +++ b/test/toggleClass/toggleClass.test.js @@ -1,14 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const toggleClass = require('./toggleClass.js'); -test('Testing toggleClass', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof toggleClass === 'function', 'toggleClass is a Function'); - t.pass('Tested by @chalarangelo on 16/02/2018'); - //t.deepEqual(toggleClass(args..), 'Expected'); - //t.equal(toggleClass(args..), 'Expected'); - //t.false(toggleClass(args..), 'Expected'); - //t.throws(toggleClass(args..), 'Expected'); - t.end(); +test('toggleClass is a Function', () => { + expect(toggleClass).toBeInstanceOf(Function); }); diff --git a/test/tomorrow/tomorrow.test.js b/test/tomorrow/tomorrow.test.js index a9f77a544..4827289c8 100644 --- a/test/tomorrow/tomorrow.test.js +++ b/test/tomorrow/tomorrow.test.js @@ -1,18 +1,17 @@ -const test = require('tape'); +const expect = require('expect'); const tomorrow = require('./tomorrow.js'); -test('Testing tomorrow', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof tomorrow === 'function', 'tomorrow is a Function'); - const t1 = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() + 1); - const t2 = new Date(tomorrow()); - t.equal(t1.getFullYear(), t2.getFullYear(), 'Returns the correct year'); - t.equal(t1.getMonth(), t2.getMonth(), 'Returns the correct month'); - t.equal(t1.getDate(), t2.getDate(), 'Returns the correct date'); - //t.deepEqual(tomorrow(args..), 'Expected'); - //t.equal(tomorrow(args..), 'Expected'); - //t.false(tomorrow(args..), 'Expected'); - //t.throws(tomorrow(args..), 'Expected'); - t.end(); +test('tomorrow is a Function', () => { + expect(tomorrow).toBeInstanceOf(Function); +}); +const t1 = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() + 1); +const t2 = new Date(tomorrow()); +test('Returns the correct year', () => { + expect(t1.getFullYear()).toBe(t2.getFullYear()); +}); +test('Returns the correct month', () => { + expect(t1.getMonth()).toBe(t2.getMonth()); +}); +test('Returns the correct date', () => { + expect(t1.getDate()).toBe(t2.getDate()); }); diff --git a/test/transform/transform.test.js b/test/transform/transform.test.js index 4e3529509..54f940e4c 100644 --- a/test/transform/transform.test.js +++ b/test/transform/transform.test.js @@ -1,21 +1,14 @@ -const test = require('tape'); +const expect = require('expect'); const transform = require('./transform.js'); -test('Testing transform', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof transform === 'function', 'transform is a Function'); - t.deepEqual(transform( +test('transform is a Function', () => { + expect(transform).toBeInstanceOf(Function); +}); +test('Transforms an object', () => { + expect(transform( { a: 1, b: 2, c: 1 }, (r, v, k) => { (r[v] || (r[v] = [])).push(k); return r; - }, - {} -), { '1': ['a', 'c'], '2': ['b'] }, 'Transforms an object'); - //t.deepEqual(transform(args..), 'Expected'); - //t.equal(transform(args..), 'Expected'); - //t.false(transform(args..), 'Expected'); - //t.throws(transform(args..), 'Expected'); - t.end(); + },{})).toEqual({ '1': ['a', 'c'], '2': ['b'] }); }); diff --git a/test/truncateString/truncateString.test.js b/test/truncateString/truncateString.test.js index 8022f5a6c..bcbf57a6a 100644 --- a/test/truncateString/truncateString.test.js +++ b/test/truncateString/truncateString.test.js @@ -1,13 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const truncateString = require('./truncateString.js'); -test('Testing truncateString', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof truncateString === 'function', 'truncateString is a Function'); - t.equal(truncateString('boomerang', 7), 'boom...', 'Truncates a "boomerang" up to a specified length.'); - //t.equal(truncateString(args..), 'Expected'); - //t.false(truncateString(args..), 'Expected'); - //t.throws(truncateString(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('truncateString is a Function', () => { + expect(truncateString).toBeInstanceOf(Function); +}); +test('Truncates a "boomerang" up to a specified length.', () => { + expect(truncateString('boomerang', 7)).toBe('boom...'); +}); diff --git a/test/truthCheckCollection/truthCheckCollection.test.js b/test/truthCheckCollection/truthCheckCollection.test.js index a844c925b..8f8c89a0a 100644 --- a/test/truthCheckCollection/truthCheckCollection.test.js +++ b/test/truthCheckCollection/truthCheckCollection.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const truthCheckCollection = require('./truthCheckCollection.js'); -test('Testing truthCheckCollection', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof truthCheckCollection === 'function', 'truthCheckCollection is a Function'); - t.equal(truthCheckCollection([{ user: 'Tinky-Winky', sex: 'male' }, { user: 'Dipsy', sex: 'male' }], 'sex'), true, "second argument is truthy on all elements of a collection"); - //t.deepEqual(truthCheckCollection(args..), 'Expected'); - //t.equal(truthCheckCollection(args..), 'Expected'); - //t.false(truthCheckCollection(args..), 'Expected'); - //t.throws(truthCheckCollection(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('truthCheckCollection is a Function', () => { + expect(truthCheckCollection).toBeInstanceOf(Function); +}); +test('second argument is truthy on all elements of a collection', () => { + expect(truthCheckCollection([{ user: 'Tinky-Winky', sex: 'male' }, { user: 'Dipsy', sex: 'male' }], 'sex')).toBeTruthy(); +}); diff --git a/test/unary/unary.test.js b/test/unary/unary.test.js index 4ea62e7a1..464c8173b 100644 --- a/test/unary/unary.test.js +++ b/test/unary/unary.test.js @@ -1,14 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const unary = require('./unary.js'); -test('Testing unary', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof unary === 'function', 'unary is a Function'); - t.deepEqual(['6', '8', '10'].map(unary(parseInt)), [6, 8, 10], 'Discards arguments after the first one'); - //t.deepEqual(unary(args..), 'Expected'); - //t.equal(unary(args..), 'Expected'); - //t.false(unary(args..), 'Expected'); - //t.throws(unary(args..), 'Expected'); - t.end(); +test('unary is a Function', () => { + expect(unary).toBeInstanceOf(Function); }); +test('Discards arguments after the first one', () => { + expect(['6', '8', '10'].map(unary(parseInt))).toEqual([6, 8, 10]); +}); + diff --git a/test/uncurry/uncurry.test.js b/test/uncurry/uncurry.test.js index 76ef507fa..b94e3d1ff 100644 --- a/test/uncurry/uncurry.test.js +++ b/test/uncurry/uncurry.test.js @@ -1,20 +1,19 @@ -const test = require('tape'); +const expect = require('expect'); const uncurry = require('./uncurry.js'); -test('Testing uncurry', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof uncurry === 'function', 'uncurry is a Function'); - const add = x => y => z => x + y + z; - const add1 = uncurry(add); - const add2 = uncurry(add, 2); - const add3 = uncurry(add, 3); - t.equal(add1(1)(2)(3), 6, 'Works without a provided value for n'); - t.equal(add2(1,2)(3), 6, 'Works without n = 2'); - t.equal(add3(1,2,3), 6, 'Works withoutn = 3'); - //t.deepEqual(uncurry(args..), 'Expected'); - //t.equal(uncurry(args..), 'Expected'); - //t.false(uncurry(args..), 'Expected'); - //t.throws(uncurry(args..), 'Expected'); - t.end(); +test('uncurry is a Function', () => { + expect(uncurry).toBeInstanceOf(Function); +}); +const add = x => y => z => x + y + z; +const add1 = uncurry(add); +const add2 = uncurry(add, 2); +const add3 = uncurry(add, 3); +test('Works without a provided value for n', () => { + expect(add1(1)(2)(3)).toBe(6); +}); +test('Works with n = 2', () => { + expect(add2(1,2)(3)).toBe(6); +}); + test('Works with n = 3', () => { + expect(add3(1,2,3)).toBe(6); }); diff --git a/test/unescapeHTML/unescapeHTML.test.js b/test/unescapeHTML/unescapeHTML.test.js index 460a20106..6f5571384 100644 --- a/test/unescapeHTML/unescapeHTML.test.js +++ b/test/unescapeHTML/unescapeHTML.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const unescapeHTML = require('./unescapeHTML.js'); -test('Testing unescapeHTML', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof unescapeHTML === 'function', 'unescapeHTML is a Function'); - t.equal(unescapeHTML('<a href="#">Me & you</a>'), 'Me & you', 'Unescapes escaped HTML characters.'); - //t.deepEqual(unescapeHTML(args..), 'Expected'); - //t.equal(unescapeHTML(args..), 'Expected'); - //t.false(unescapeHTML(args..), 'Expected'); - //t.throws(unescapeHTML(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('unescapeHTML is a Function', () => { + expect(unescapeHTML).toBeInstanceOf(Function); +}); +test('Unescapes escaped HTML characters.', () => { + expect(unescapeHTML('<a href="#">Me & you</a>')).toBe('Me & you'); +}); diff --git a/test/unflattenObject/unflattenObject.test.js b/test/unflattenObject/unflattenObject.test.js index 05ac15d70..743524974 100644 --- a/test/unflattenObject/unflattenObject.test.js +++ b/test/unflattenObject/unflattenObject.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const unflattenObject = require('./unflattenObject.js'); -test('Testing unflattenObject', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof unflattenObject === 'function', 'unflattenObject is a Function'); - t.deepEqual(unflattenObject({ 'a.b.c': 1, d: 1 }), { a: { b: { c: 1 } }, d: 1 }, 'Unflattens an object with the paths for keys'); - //t.deepEqual(unflattenObject(args..), 'Expected'); - //t.equal(unflattenObject(args..), 'Expected'); - //t.false(unflattenObject(args..), 'Expected'); - //t.throws(unflattenObject(args..), 'Expected'); - t.end(); +test('unflattenObject is a Function', () => { + expect(unflattenObject).toBeInstanceOf(Function); +}); +test('Unflattens an object with the paths for keys', () => { + expect(unflattenObject({ 'a.b.c': 1, d: 1 })).toEqual({ a: { b: { c: 1 } }, d: 1 }); }); diff --git a/test/unfold/unfold.test.js b/test/unfold/unfold.test.js index bf14e7290..b8eb61ac7 100644 --- a/test/unfold/unfold.test.js +++ b/test/unfold/unfold.test.js @@ -1,15 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const unfold = require('./unfold.js'); -test('Testing unfold', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof unfold === 'function', 'unfold is a Function'); - var f = n => (n > 50 ? false : [-n, n + 10]); - t.deepEqual(unfold(f, 10), [-10, -20, -30, -40, -50], 'Works with a given function, producing an array'); - //t.deepEqual(unfold(args..), 'Expected'); - //t.equal(unfold(args..), 'Expected'); - //t.false(unfold(args..), 'Expected'); - //t.throws(unfold(args..), 'Expected'); - t.end(); +test('unfold is a Function', () => { + expect(unfold).toBeInstanceOf(Function); +}); +var f = n => (n > 50 ? false : [-n, n + 10]); +test('Works with a given function, producing an array', () => { + expect(unfold(f, 10)).toEqual([-10, -20, -30, -40, -50]); }); diff --git a/test/union/union.test.js b/test/union/union.test.js index fd6157918..bf23e1805 100644 --- a/test/union/union.test.js +++ b/test/union/union.test.js @@ -1,24 +1,42 @@ -const test = require('tape'); +const expect = require('expect'); const union = require('./union.js'); -test('Testing union', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof union === 'function', 'union is a Function'); - t.deepEqual(union([1, 2, 3], [4, 3, 2]), [1, 2, 3, 4], "union([1, 2, 3], [4, 3, 2]) returns [1, 2, 3, 4]"); - t.deepEqual(union('str', 'asd'), [ 's', 't', 'r', 'a', 'd' ], "union('str', 'asd') returns [ 's', 't', 'r', 'a', 'd' ]"); - t.deepEqual(union([[], {}], [1, 2, 3]), [[], {}, 1, 2, 3], "union([[], {}], [1, 2, 3]) returns [[], {}, 1, 2, 3]"); - t.deepEqual(union([], []), [], "union([], []) returns []"); - t.throws(() => union(), 'union() throws an error'); - t.throws(() => union(true, 'str'), 'union(true, str) throws an error'); - t.throws(() => union('false', true), 'union(false, true) throws an error'); - t.throws(() => union(123, {}), 'union(123, {}) throws an error'); - t.throws(() => union([], {}), 'union([], {}) throws an error'); - t.throws(() => union(undefined, null), 'union(undefined, null) throws an error'); - - let start = new Date().getTime(); - union([1, 2, 3], [4, 3, 2]); - let end = new Date().getTime(); - t.true((end - start) < 2000, 'union([1, 2, 3], [4, 3, 2]) takes less than 2s to run'); - t.end(); +test('union is a Function', () => { + expect(union).toBeInstanceOf(Function); +}); +test('union([1, 2, 3], [4, 3, 2]) returns [1, 2, 3, 4]', () => { + expect(union([1, 2, 3], [4, 3, 2])).toEqual([1, 2, 3, 4]); +}); +test('union(\'str\', \'asd\') returns [ \'s\', \'t\', \'r\', \'a\', \'d\' ]', () => { + expect(union('str', 'asd')).toEqual([ 's', 't', 'r', 'a', 'd' ]); +}); +test('union([[], {}], [1, 2, 3]) returns [[], {}, 1, 2, 3]', () => { + expect(union([[], {}], [1, 2, 3])).toEqual([[], {}, 1, 2, 3]); +}); +test('union([], []) returns []', () => { + expect(union([], [])).toEqual([]); +}); +test('union() throws an error', () => { + expect(() => {union(); }).toThrow(); +}); +test('union(true, \'str\') throws an error', () => { + expect(() => {union(true, 'str'); }).toThrow(); +}); +test('union(\'false\', true) throws an error', () => { + expect(() => {union('false', true); }).toThrow(); +}); +test('union((123, {}) throws an error', () => { + expect(() => {union(123, {}); }).toThrow(); +}); +test('union([], {}) throws an error', () => { + expect(() => {union([], {}); }).toThrow(); +}); +test('union(undefined, null) throws an error', () => { + expect(() => {union(undefined, null); }).toThrow(); +}); +let start = new Date().getTime(); +union([1, 2, 3], [4, 3, 2]); +let end = new Date().getTime(); +test('union([1, 2, 3], [4, 3, 2]) takes less than 2s to run', () => { + expect((end - start) < 2000).toBeTruthy(); }); diff --git a/test/unionBy/unionBy.test.js b/test/unionBy/unionBy.test.js index c412368ce..e4f5ed98b 100644 --- a/test/unionBy/unionBy.test.js +++ b/test/unionBy/unionBy.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const unionBy = require('./unionBy.js'); -test('Testing unionBy', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof unionBy === 'function', 'unionBy is a Function'); - t.deepEqual(unionBy([2.1], [1.2, 2.3], Math.floor), [2.1, 1.2], 'Produces the appropriate results'); - //t.deepEqual(unionBy(args..), 'Expected'); - //t.equal(unionBy(args..), 'Expected'); - //t.false(unionBy(args..), 'Expected'); - //t.throws(unionBy(args..), 'Expected'); - t.end(); +test('unionBy is a Function', () => { + expect(unionBy).toBeInstanceOf(Function); +}); +test('Produces the appropriate results', () => { + expect(unionBy([2.1], [1.2, 2.3], Math.floor)).toEqual([2.1, 1.2]); }); diff --git a/test/unionWith/unionWith.test.js b/test/unionWith/unionWith.test.js index 852226eb9..d99c24835 100644 --- a/test/unionWith/unionWith.test.js +++ b/test/unionWith/unionWith.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const unionWith = require('./unionWith.js'); -test('Testing unionWith', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof unionWith === 'function', 'unionWith is a Function'); - t.deepEqual(unionWith([1, 1.2, 1.5, 3, 0], [1.9, 3, 0, 3.9], (a, b) => Math.round(a) === Math.round(b)), [1, 1.2, 1.5, 3, 0, 3.9], 'Produces the appropriate results'); - //t.deepEqual(unionWith(args..), 'Expected'); - //t.equal(unionWith(args..), 'Expected'); - //t.false(unionWith(args..), 'Expected'); - //t.throws(unionWith(args..), 'Expected'); - t.end(); +test('unionWith is a Function', () => { + expect(unionWith).toBeInstanceOf(Function); +}); +test('Produces the appropriate results', () => { + expect(unionWith([1, 1.2, 1.5, 3, 0], [1.9, 3, 0, 3.9], (a, b) => Math.round(a) === Math.round(b))).toEqual([1, 1.2, 1.5, 3, 0, 3.9]); }); diff --git a/test/uniqueElements/uniqueElements.test.js b/test/uniqueElements/uniqueElements.test.js index 2dd158e08..7c659f2ed 100644 --- a/test/uniqueElements/uniqueElements.test.js +++ b/test/uniqueElements/uniqueElements.test.js @@ -1,28 +1,46 @@ -const test = require('tape'); +const expect = require('expect'); const uniqueElements = require('./uniqueElements.js'); -test('Testing uniqueElements', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof uniqueElements === 'function', 'uniqueElements is a Function'); - t.deepEqual(uniqueElements([1, 2, 2, 3, 4, 4, 5]), [1,2,3,4,5], "uniqueElements([1, 2, 2, 3, 4, 4, 5]) returns [1,2,3,4,5]"); - t.deepEqual(uniqueElements([1, 23, 53]), [1, 23, 53], "uniqueElements([1, 23, 53]) returns [1, 23, 53]"); - t.deepEqual(uniqueElements([true, 0, 1, false, false, undefined, null, '']), [true, 0, 1, false, undefined, null, ''], "uniqueElements([true, 0, 1, false, false, undefined, null, '']) returns [true, 0, 1, false, false, undefined, null, '']"); - t.deepEqual(uniqueElements(), [], "uniqueElements() returns []"); - t.deepEqual(uniqueElements(null), [], "uniqueElements(null) returns []"); - t.deepEqual(uniqueElements(undefined), [], "uniqueElements(undefined) returns []"); - t.deepEqual(uniqueElements('strt'), ['s', 't', 'r'], "uniqueElements('strt') returns ['s', 't', 'r']"); - t.throws(() => uniqueElements(1, 1, 2543, 534, 5), 'uniqueElements(1, 1, 2543, 534, 5) throws an error'); - t.throws(() => uniqueElements({}), 'uniqueElements({}) throws an error'); - t.throws(() => uniqueElements(true), 'uniqueElements(true) throws an error'); - t.throws(() => uniqueElements(false), 'uniqueElements(false) throws an error'); - let start = new Date().getTime(); - uniqueElements([true, 0, 1, false, false, undefined, null, '']); - let end = new Date().getTime(); - t.true((end - start) < 2000, 'uniqueElements([true, 0, 1, false, false, undefined, null]) takes less than 2s to run'); - - t.end(); +test('uniqueElements is a Function', () => { + expect(uniqueElements).toBeInstanceOf(Function); +}); +test('uniqueElements([1, 2, 2, 3, 4, 4, 5]) returns [1,2,3,4,5]', () => { + expect(uniqueElements([1, 2, 2, 3, 4, 4, 5])).toEqual([1,2,3,4,5]); +}); +test('uniqueElements([1, 23, 53]) returns [1, 23, 53]', () => { + expect(uniqueElements([1, 23, 53])).toEqual([1, 23, 53]); +}); +test('uniqueElements([true, 0, 1, false, false, undefined, null, \'\']) returns [true, 0, 1, false, false, undefined, null, \'\']', () => { + expect(uniqueElements([true, 0, 1, false, false, undefined, null, ''])).toEqual([true, 0, 1, false, undefined, null, '']); +}); +test('uniqueElements() returns []', () => { + expect(uniqueElements()).toEqual([]); +}); +test('uniqueElements(null) returns []', () => { + expect(uniqueElements(null)).toEqual([]); +}); +test('uniqueElements(undefined) returns []', () => { + expect(uniqueElements(undefined)).toEqual([]); +}); +test('uniqueElements(\'strt\') returns [\'s\', \'t\', \'r\']', () => { + expect(uniqueElements('strt')).toEqual(['s', 't', 'r']); +}); +test('uniqueElements(1, 1, 2543, 534, 5) throws an error', () => { + expect(() => {uniqueElements(1, 1, 2543, 534, 5); }).toThrow(); +}); +test('uniqueElements({}) throws an error', () => { + expect(() => {uniqueElements({}); }).toThrow(); +}); +test('uniqueElements(true) throws an error', () => { + expect(() => {uniqueElements(true); }).toThrow(); +}); +test('uniqueElements(false) throws an error', () => { + expect(() => {uniqueElements(false); }).toThrow(); +}); +let start = new Date().getTime(); +uniqueElements([true, 0, 1, false, false, undefined, null, '']); +let end = new Date().getTime(); +test('uniqueElements([true, 0, 1, false, false, undefined, null]) takes less than 2s to run', () => { + expect((end - start) < 2000).toBeTruthy(); }); - -uniqueElements([1, 2, 2, '1', 4, 4, 4, 5, true]); // [1,2,3,4,5] diff --git a/test/untildify/untildify.test.js b/test/untildify/untildify.test.js index 1e00ff510..d8e3134e1 100644 --- a/test/untildify/untildify.test.js +++ b/test/untildify/untildify.test.js @@ -1,16 +1,15 @@ -const test = require('tape'); +const expect = require('expect'); const untildify = require('./untildify.js'); -test('Testing untildify', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof untildify === 'function', 'untildify is a Function'); - t.true(untildify('~/test/dir/file.f').indexOf('~') === -1, 'Contains no tildes'); - t.equal(untildify('~/test/dir/file.f').slice(-16), '/test/dir/file.f', 'Does not alter the rest of the path'); - t.equal(untildify('test/dir/file.f'), 'test/dir/file.f', 'Does not alter paths without tildes'); - //t.deepEqual(untildify(args..), 'Expected'); - //t.equal(untildify(args..), 'Expected'); - //t.false(untildify(args..), 'Expected'); - //t.throws(untildify(args..), 'Expected'); - t.end(); +test('untildify is a Function', () => { + expect(untildify).toBeInstanceOf(Function); +}); +test('Contains no tildes', () => { + expect(untildify('~/test/dir/file.f').indexOf('~') === -1).toBeTruthy(); +}); +test('Does not alter the rest of the path', () => { + expect(untildify('~/test/dir/file.f').slice(-16)).toBe('/test/dir/file.f'); +}); +test('Does not alter paths without tildes', () => { + expect(untildify('test/dir/file.f')).toBe('test/dir/file.f'); }); diff --git a/test/unzip/unzip.test.js b/test/unzip/unzip.test.js index acfddc110..1d25cd38c 100644 --- a/test/unzip/unzip.test.js +++ b/test/unzip/unzip.test.js @@ -1,15 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const unzip = require('./unzip.js'); -test('Testing unzip', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof unzip === 'function', 'unzip is a Function'); - t.deepEqual(unzip([['a', 1, true], ['b', 2, false]]), [['a', 'b'], [1, 2], [true, false]], `unzip([['a', 1, true], ['b', 2, false]]) equals [['a', 'b'], [1, 2], [true, false]]`); - t.deepEqual(unzip([['a', 1, true], ['b', 2]]), [['a', 'b'], [1, 2], [true]], `unzip([['a', 1, true], ['b', 2]]) equals [['a', 'b'], [1, 2], [true]]`); - //t.deepEqual(unzip(args..), 'Expected'); - //t.equal(unzip(args..), 'Expected'); - //t.false(unzip(args..), 'Expected'); - //t.throws(unzip(args..), 'Expected'); - t.end(); +test('unzip is a Function', () => { + expect(unzip).toBeInstanceOf(Function); +}); +test('unzip([[\'a\', 1, true], [\'b\', 2, false]]) equals [[\'a\',\'b\'], [1, 2], [true, false]]', () => { + expect(unzip([['a', 1, true], ['b', 2, false]])).toEqual([['a', 'b'], [1, 2], [true, false]]); +}); +test('unzip([[\'a\', 1, true], [\'b\', 2]]) equals [[\'a\',\'b\'], [1, 2], [true]]', () => { + expect(unzip([['a', 1, true], ['b', 2]])).toEqual([['a', 'b'], [1, 2], [true]]); }); diff --git a/test/unzipWith/unzipWith.test.js b/test/unzipWith/unzipWith.test.js index a9416e7c2..40e0fbacd 100644 --- a/test/unzipWith/unzipWith.test.js +++ b/test/unzipWith/unzipWith.test.js @@ -1,13 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const unzipWith = require('./unzipWith.js'); -test('Testing unzipWith', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof unzipWith === 'function', 'unzipWith is a Function'); - t.deepEqual(unzipWith([[1, 10, 100], [2, 20, 200]], (...args) => args.reduce((acc, v) => acc + v, 0)), [3, 30, 300], `unzipWith([[1, 10, 100], [2, 20, 200]], (...args) => args.reduce((acc, v) => acc + v, 0)) equals [3, 30, 300]`); - //t.equal(unzipWith(args..), 'Expected'); - //t.false(unzipWith(args..), 'Expected'); - //t.throws(unzipWith(args..), 'Expected'); - t.end(); +test('unzipWith is a Function', () => { + expect(unzipWith).toBeInstanceOf(Function); +}); +test('unzipWith([[1, 10, 100], [2, 20, 200]], (...args) => args.reduce((acc, v) => acc + v, 0)) equals [3, 30, 300]', () => { + expect(unzipWith([[1, 10, 100], [2, 20, 200]], (...args) => args.reduce((acc, v) => acc + v, 0))).toEqual([3, 30, 300]); }); diff --git a/test/validateNumber/validateNumber.test.js b/test/validateNumber/validateNumber.test.js index e8037cc65..2d009afae 100644 --- a/test/validateNumber/validateNumber.test.js +++ b/test/validateNumber/validateNumber.test.js @@ -1,22 +1,42 @@ -const test = require('tape'); +const expect = require('expect'); const validateNumber = require('./validateNumber.js'); -test('Testing validateNumber', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof validateNumber === 'function', 'validateNumber is a Function'); - t.true(validateNumber(9), 'validateNumber(9) returns true'); - t.true(validateNumber('234asd'.slice(0, 2)), 'validateNumber(234asd.slice(0, 2)) returns true'); - t.true(validateNumber(1232), 'validateNumber(1232) returns true'); - t.true(validateNumber(1232 + 13423), 'validateNumber(1232 + 13423) returns true'); - t.true(validateNumber(1232 * 2342 * 123), 'validateNumber(1232 * 2342 * 123) returns true'); - t.true(validateNumber(1232.23423536), 'validateNumber(1232.23423536) returns true'); - t.false(validateNumber('234asd'), 'validateNumber(234asd) returns false'); - t.false(validateNumber('e234d'), 'validateNumber(e234d) returns false'); - t.false(validateNumber(false), 'validateNumber(false) returns false'); - t.false(validateNumber(true), 'validateNumber(true) returns false'); - t.false(validateNumber(null), 'validateNumber(null) returns false'); - t.false(validateNumber(123 * 'asd'), 'validateNumber(123 * asd) returns false'); - - t.end(); +test('validateNumber is a Function', () => { + expect(validateNumber).toBeInstanceOf(Function); +}); +test('validateNumber(9) returns true', () => { + expect(validateNumber(9)).toBeTruthy(); +}); +test('validateNumber(234asd.slice(0, 2)) returns true', () => { + expect(validateNumber('234asd'.slice(0, 2))).toBeTruthy(); +}); +test('validateNumber(1232) returns true', () => { + expect(validateNumber(1232)).toBeTruthy(); +}); +test('validateNumber(1232 + 13423) returns true', () => { + expect(validateNumber(1232 + 13423)).toBeTruthy(); +}); +test('validateNumber(1232 * 2342 * 123) returns true', () => { + expect(validateNumber(1232 * 2342 * 123)).toBeTruthy(); +}); +test('validateNumber(1232.23423536) returns true', () => { + expect(validateNumber(1232.23423536)).toBeTruthy(); +}); +test('validateNumber(234asd) returns false', () => { + expect(validateNumber('234asd')).toBeFalsy(); +}); +test('validateNumber(e234d) returns false', () => { + expect(validateNumber('e234d')).toBeFalsy(); +}); +test('validateNumber(false) returns false', () => { + expect(validateNumber(false)).toBeFalsy(); +}); +test('validateNumber(true) returns false', () => { + expect(validateNumber(true)).toBeFalsy(); +}); +test('validateNumber(null) returns false', () => { + expect(validateNumber(null)).toBeFalsy(); +}); +test('validateNumber(123 * asd) returns false', () => { + expect(validateNumber(123 * 'asd')).toBeFalsy(); }); diff --git a/test/when/when.test.js b/test/when/when.test.js index 1a814190f..0feb021e8 100644 --- a/test/when/when.test.js +++ b/test/when/when.test.js @@ -1,18 +1,16 @@ -const test = require('tape'); +const expect = require('expect'); const when = require('./when.js'); -test('Testing when', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof when === 'function', 'when is a Function'); - - const doubleEvenNumbers = when( - (x) => x % 2 === 0, - (x) => x * 2 - ); - - t.true(doubleEvenNumbers(2) === 4); - t.true(doubleEvenNumbers(1) === 1); - - t.end(); +test('when is a Function', () => { + expect(when).toBeInstanceOf(Function); +}); +const doubleEvenNumbers = when( + (x) => x % 2 === 0, + (x) => x * 2 +); +test('Returns the proper result', () => { + expect(doubleEvenNumbers(2)).toBe(4); +}); +test('Returns the proper result', () => { + expect(doubleEvenNumbers(1)).toBe(1); }); diff --git a/test/without/without.test.js b/test/without/without.test.js index 7d9fa7e70..38711423e 100644 --- a/test/without/without.test.js +++ b/test/without/without.test.js @@ -1,19 +1,33 @@ -const test = require('tape'); +const expect = require('expect'); const without = require('./without.js'); -test('Testing without', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof without === 'function', 'without is a Function'); - t.deepEqual(without([2, 1, 2, 3], 1, 2), [3], "without([2, 1, 2, 3], 1, 2) returns [3]"); - t.deepEqual(without([]), [], "without([]) returns []"); - t.deepEqual(without([3, 1, true, '3', true], '3', true), [3, 1], "without([3, 1, true, '3', true], '3', true) returns [3, 1]"); - t.deepEqual(without('string'.split(''), 's', 't', 'g'), ['r', 'i', 'n'], "without('string'.split(''), 's', 't', 'g') returns ['r', 'i', 'n']"); - t.throws(() => without(), 'without() throws an error'); - t.throws(() => without(null), 'without(null) throws an error'); - t.throws(() => without(undefined), 'without(undefined) throws an error'); - t.throws(() => without(123), 'without() throws an error'); - t.throws(() => without({}), 'without({}) throws an error'); - - t.end(); +test('without is a Function', () => { + expect(without).toBeInstanceOf(Function); +}); +test('without([2, 1, 2, 3], 1, 2) returns [3]', () => { + expect(without([2, 1, 2, 3], 1, 2)).toEqual([3]); +}); +test('without([]) returns []', () => { + expect(without([])).toEqual([]); +}); +test('without([3, 1, true, \'3\', true], \'3\', true) returns [3, 1]', () => { + expect(without([3, 1, true, '3', true], '3', true)).toEqual([3, 1]); +}); +test('without(\'string\'.split(\'\'), \'s\', \'t\', \'g\') returns [\'r\', \'i\', \'n\']', () => { + expect(without('string'.split(''), 's', 't', 'g')).toEqual(['r', 'i', 'n']); +}); +test('without() throws an error', () => { + expect(() => { without(); }).toThrow(); +}); +test('without(null) throws an error', () => { + expect(() => { without(null); }).toThrow(); +}); +test('without(undefined) throws an error', () => { + expect(() => { without(undefined); }).toThrow(); +}); +test('without(123) throws an error', () => { + expect(() => { without(123); }).toThrow(); +}); +test('without({}) throws an error', () => { + expect(() => { without({}); }).toThrow(); }); diff --git a/test/words/words.test.js b/test/words/words.test.js index 1c8a7fda7..ff64ef83b 100644 --- a/test/words/words.test.js +++ b/test/words/words.test.js @@ -1,19 +1,33 @@ -const test = require('tape'); +const expect = require('expect'); const words = require('./words.js'); -test('Testing words', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof words === 'function', 'words is a Function'); - t.deepEqual(words('I love javaScript!!'), ["I", "love", "javaScript"], "words('I love javaScript!!') returns [I, love, javaScript]"); - t.deepEqual(words('python, javaScript & coffee'), ["python", "javaScript", "coffee"], "words('python, javaScript & coffee') returns [python, javaScript, coffee]"); - t.true(Array.isArray(words('I love javaScript!!')), 'words(I love javaScript!!) returns an array'); - t.throws(() => words(), 'words() throws a error'); - t.throws(() => words(null), 'words(null) throws a error'); - t.throws(() => words(undefined), 'words(undefined) throws a error'); - t.throws(() => words({}), 'words({}) throws a error'); - t.throws(() => words([]), 'words([]) throws a error'); - t.throws(() => words(1234), 'words(1234) throws a error'); - - t.end(); +test('words is a Function', () => { + expect(words).toBeInstanceOf(Function); +}); +test('words(\'I love javaScript!!\') returns [I, love, javaScript]', () => { + expect(words('I love javaScript!!')).toEqual(["I", "love", "javaScript"]); +}); +test('words(\'python, javaScript & coffee\') returns [python, javaScript, coffee]', () => { + expect(words('python, javaScript & coffee')).toEqual(["python", "javaScript", "coffee"]); +}); +test('words(I love javaScript!!) returns an array', () => { + expect(Array.isArray(words('I love javaScript!!'))).toBeTruthy(); +}); +test('words() throws an error', () => { + expect(() => { words(); }).toThrow(); +}); +test('words(null) throws an error', () => { + expect(() => { words(null); }).toThrow(); +}); +test('words(undefined) throws an error', () => { + expect(() => { words(undefined); }).toThrow(); +}); +test('words({}) throws an error', () => { + expect(() => { words({}); }).toThrow(); +}); +test('words([]) throws an error', () => { + expect(() => { words([]); }).toThrow(); +}); +test('words(1234) throws an error', () => { + expect(() => { words(1234); }).toThrow(); }); diff --git a/test/xProd/xProd.test.js b/test/xProd/xProd.test.js index 9bc6571de..c4cea5de1 100644 --- a/test/xProd/xProd.test.js +++ b/test/xProd/xProd.test.js @@ -1,14 +1,9 @@ -const test = require('tape'); +const expect = require('expect'); const xProd = require('./xProd.js'); -test('Testing xProd', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof xProd === 'function', 'xProd is a Function'); - t.deepEqual(xProd([1, 2], ['a', 'b']), [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']], `xProd([1, 2], ['a', 'b']) returns [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']]`); - //t.deepEqual(xProd(args..), 'Expected'); - //t.equal(xProd(args..), 'Expected'); - //t.false(xProd(args..), 'Expected'); - //t.throws(xProd(args..), 'Expected'); - t.end(); +test('xProd is a Function', () => { + expect(xProd).toBeInstanceOf(Function); +}); +test('xProd([1, 2], [\'a\', \'b\']) returns [[1, \'a\'], [1, \'b\'], [2, \'a\'], [2, \'b\']]', () => { + expect(xProd([1, 2], ['a', 'b'])).toEqual([[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']]); }); diff --git a/test/yesNo/yesNo.test.js b/test/yesNo/yesNo.test.js index 6b7c66d1c..9bc825531 100644 --- a/test/yesNo/yesNo.test.js +++ b/test/yesNo/yesNo.test.js @@ -1,22 +1,42 @@ -const test = require('tape'); +const expect = require('expect'); const yesNo = require('./yesNo.js'); -test('Testing yesNo', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof yesNo === 'function', 'yesNo is a Function'); - t.true(yesNo('Y'), 'yesNo(Y) returns true'); - t.true(yesNo('yes'), 'yesNo(yes) returns true'); - t.true(yesNo('foo', true), 'yesNo(foo, true) returns true'); - t.false(yesNo('No'), 'yesNo(No) returns false'); - t.false(yesNo(), 'yesNo() returns false'); - t.false(yesNo(null), 'yesNo(null) returns false'); - t.false(yesNo(undefined), 'yesNo(undefined) returns false'); - t.false(yesNo([123, null]), 'yesNo([123, null]) returns false'); - t.false(yesNo(['Yes', 'No']), 'yesNo([Yes, No]) returns false'); - t.false(yesNo({ 2: 'Yes' }), 'yesNo({ 2: Yes }) returns false'); - t.true(yesNo(['Yes', 'No'], true), 'yesNo([Yes, No], true) returns true'); - t.true(yesNo({ 2: 'Yes' }, true), 'yesNo({ 2: Yes }, true) returns true'); - - t.end(); +test('yesNo is a Function', () => { + expect(yesNo).toBeInstanceOf(Function); +}); +test('yesNo(Y) returns true', () => { + expect(yesNo('Y')).toBeTruthy(); +}); +test('yesNo(yes) returns true', () => { + expect(yesNo('yes')).toBeTruthy(); +}); +test('yesNo(foo, true) returns true', () => { + expect(yesNo('foo', true)).toBeTruthy(); +}); +test('yesNo(No) returns false', () => { + expect(yesNo('No')).toBeFalsy(); +}); +test('yesNo() returns false', () => { + expect(yesNo()).toBeFalsy(); +}); +test('yesNo(null) returns false', () => { + expect(yesNo(null)).toBeFalsy(); +}); +test('yesNo(undefined) returns false', () => { + expect(yesNo(undefined)).toBeFalsy(); +}); +test('yesNo([123, null]) returns false', () => { + expect(yesNo([123, null])).toBeFalsy(); +}); +test('yesNo([Yes, No]) returns false', () => { + expect(yesNo(['Yes', 'No'])).toBeFalsy(); +}); +test('yesNo({ 2: Yes }) returns false', () => { + expect(yesNo({ 2: 'Yes' })).toBeFalsy(); +}); +test('yesNo([Yes, No], true) returns true', () => { + expect(yesNo(['Yes', 'No'], true)).toBeTruthy(); +}); +test('yesNo({ 2: Yes }, true) returns true', () => { + expect(yesNo({ 2: 'Yes' }, true)).toBeTruthy(); }); diff --git a/test/zip/zip.test.js b/test/zip/zip.test.js index 8e6ce6747..270554046 100644 --- a/test/zip/zip.test.js +++ b/test/zip/zip.test.js @@ -1,18 +1,31 @@ -const test = require('tape'); +const expect = require('expect'); const zip = require('./zip.js'); -test('Testing zip', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof zip === 'function', 'zip is a Function'); - t.deepEqual(zip(['a', 'b'], [1, 2], [true, false]), [['a', 1, true], ['b', 2, false]], 'zip([a, b], [1, 2], [true, false]) returns [[a, 1, true], [b, 2, false]]'); - t.deepEqual(zip(['a'], [1, 2], [true, false]), [['a', 1, true], [undefined, 2, false]], 'zip([a], [1, 2], [true, false]) returns [[a, 1, true], [undefined, 2, false]]'); - t.deepEqual(zip(), [], 'zip([]) returns []'); - t.deepEqual(zip(123), [], 'zip(123) returns []'); - t.true(Array.isArray(zip(['a', 'b'], [1, 2], [true, false])), 'zip([a, b], [1, 2], [true, false]) returns an Array'); - t.true(Array.isArray(zip(['a'], [1, 2], [true, false])), 'zip([a], [1, 2], [true, false]) returns an Array'); - t.throws(() => zip(null), 'zip(null) throws an error'); - t.throws(() => zip(undefined), 'zip(undefined) throws an error'); - t.end(); +test('zip is a Function', () => { + expect(zip).toBeInstanceOf(Function); +}); +test('zip([a, b], [1, 2], [true, false]) returns [[a, 1, true], [b, 2, false]]', () => { + expect(zip(['a', 'b'], [1, 2], [true, false])).toEqual([['a', 1, true], ['b', 2, false]]); +}); +test('zip([a], [1, 2], [true, false]) returns [[a, 1, true], [undefined, 2, false]]', () => { + expect(zip(['a'], [1, 2], [true, false])).toEqual([['a', 1, true], [undefined, 2, false]]); +}); +test('zip([]) returns []', () => { + expect(zip()).toEqual([]); +}); +test('zip(123) returns []', () => { + expect(zip(123)).toEqual([]); +}); +test('zip([a, b], [1, 2], [true, false]) returns an Array', () => { + expect(Array.isArray(zip(['a', 'b'], [1, 2], [true, false]))).toBeTruthy(); +}); +test('zip([a], [1, 2], [true, false]) returns an Array', () => { + expect(Array.isArray(zip(['a'], [1, 2], [true, false]))).toBeTruthy(); +}); +test('zip(null) throws an error', () => { + expect(() => {zip(null);}).toThrow(); +}); +test('zip(undefined) throws an error', () => { + expect(() => {zip(undefined);}).toThrow(); }); diff --git a/test/zipObject/zipObject.test.js b/test/zipObject/zipObject.test.js index 83ba782a0..2a10a9f0f 100644 --- a/test/zipObject/zipObject.test.js +++ b/test/zipObject/zipObject.test.js @@ -1,19 +1,33 @@ -const test = require('tape'); +const expect = require('expect'); const zipObject = require('./zipObject.js'); -test('Testing zipObject', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof zipObject === 'function', 'zipObject is a Function'); - t.deepEqual(zipObject(['a', 'b', 'c'], [1, 2]), {a: 1, b: 2, c: undefined}, 'zipObject([a, b, c], [1, 2]) returns {a: 1, b: 2, c: undefined}'); - t.deepEqual(zipObject(['a', 'b'], [1, 2, 3]), {a: 1, b: 2}, 'zipObject([a, b], [1, 2, 3]) returns {a: 1, b: 2}'); - t.deepEqual(zipObject(['a', 'b', 'c'], 'string'), { a: 's', b: 't', c: 'r' }, 'zipObject([a, b, c], string) returns { a: s, b: t, c: r }'); - t.deepEqual(zipObject(['a'], 'string'), { a: 's' }, 'zipObject([a], string) returns { a: s }'); - t.throws(() => zipObject(), 'zipObject() throws an error'); - t.throws(() => zipObject(['string'], null), 'zipObject([string], null) throws an error'); - t.throws(() => zipObject(null, [1]), 'zipObject(null, [1]) throws an error'); - t.throws(() => zipObject('string'), 'zipObject(string) throws an error'); - t.throws(() => zipObject('test', 'string'), 'zipObject(test, string) throws an error'); - - t.end(); +test('zipObject is a Function', () => { + expect(zipObject).toBeInstanceOf(Function); +}); +test('zipObject([a, b, c], [1, 2]) returns {a: 1, b: 2, c: undefined}', () => { + expect(zipObject(['a', 'b', 'c'], [1, 2])).toEqual({a: 1, b: 2, c: undefined}); +}); +test('zipObject([a, b], [1, 2, 3]) returns {a: 1, b: 2}', () => { + expect(zipObject(['a', 'b'], [1, 2, 3])).toEqual({a: 1, b: 2}); +}); +test('zipObject([a, b, c], string) returns { a: s, b: t, c: r }', () => { + expect(zipObject(['a', 'b', 'c'], 'string')).toEqual({ a: 's', b: 't', c: 'r' }); +}); +test('zipObject([a], string) returns { a: s }', () => { + expect(zipObject(['a'], 'string')).toEqual({ a: 's' }); +}); +test('zipObject() throws an error', () => { + expect(() => {zipObject();}).toThrow(); +}); +test('zipObject(([\'string\'], null) throws an error', () => { + expect(() => {zipObject(['string'], null);}).toThrow(); +}); +test('zipObject(null, [1]) throws an error', () => { + expect(() => {zipObject(null, [1]);}).toThrow(); +}); +test('zipObject(\'string\') throws an error', () => { + expect(() => {zipObject('string');}).toThrow(); +}); +test('zipObject(\'test\', \'string\') throws an error', () => { + expect(() => {zipObject('test', 'string');}).toThrow(); }); diff --git a/test/zipWith/zipWith.test.js b/test/zipWith/zipWith.test.js index 2cf409e24..3cffd0a46 100644 --- a/test/zipWith/zipWith.test.js +++ b/test/zipWith/zipWith.test.js @@ -1,13 +1,6 @@ -const test = require('tape'); +const expect = require('expect'); const zipWith = require('./zipWith.js'); -test('Testing zipWith', (t) => { - //For more information on all the methods supported by tape - //Please go to https://github.com/substack/tape - t.true(typeof zipWith === 'function', 'zipWith is a Function'); - //t.deepEqual(zipWith(args..), 'Expected'); - //t.equal(zipWith(args..), 'Expected'); - //t.false(zipWith(args..), 'Expected'); - //t.throws(zipWith(args..), 'Expected'); - t.end(); -}); \ No newline at end of file +test('zipWith is a Function', () => { + expect(zipWith).toBeInstanceOf(Function); +}); diff --git a/yarn.lock b/yarn.lock index 023d7e69c..b28612d52 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,28 @@ # yarn lockfile v1 +"@babel/code-frame@7.0.0-beta.36": + version "7.0.0-beta.36" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.36.tgz#2349d7ec04b3a06945ae173280ef8579b63728e4" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + +"@babel/code-frame@^7.0.0-beta.35": + version "7.0.0-beta.51" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.51.tgz#bd71d9b192af978df915829d39d4094456439a0c" + dependencies: + "@babel/highlight" "7.0.0-beta.51" + +"@babel/highlight@7.0.0-beta.51": + version "7.0.0-beta.51" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.51.tgz#e8844ae25a1595ccfd42b89623b4376ca06d225d" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + "@comandeer/babel-plugin-banner@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@comandeer/babel-plugin-banner/-/babel-plugin-banner-1.0.0.tgz#40bcce0bbee084b5b02545a33635d053c248356f" @@ -11,8 +33,8 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.38.tgz#c1be40aa933723c608820a99a373a16d215a1ca2" "@types/node@*": - version "10.0.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.0.3.tgz#1f89840c7aac2406cc43a2ecad98fc02a8e130e4" + version "10.3.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.3.3.tgz#8798d9e39af2fa604f715ee6a6b19796528e46c3" abab@^1.0.4: version "1.0.4" @@ -39,13 +61,20 @@ acorn@^3.0.4: resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" acorn@^5.0.0, acorn@^5.3.0, acorn@^5.5.0: - version "5.5.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.3.tgz#f473dd47e0277a08e28e9bec5aeeb04751f0b8c9" + version "5.7.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8" ajv-keywords@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" +ajv@^4.9.1: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + ajv@^5.1.0, ajv@^5.2.3, ajv@^5.3.0: version "5.5.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" @@ -55,6 +84,14 @@ ajv@^5.1.0, ajv@^5.2.3, ajv@^5.3.0: fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.3.0" +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" @@ -75,19 +112,32 @@ ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" -ansi-styles@^3.2.1: +ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" dependencies: color-convert "^1.9.0" +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +append-transform@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" + dependencies: + default-require-extensions "^2.0.0" + aproba@^1.0.3: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" are-we-there-yet@~1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" + version "1.1.5" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" dependencies: delegates "^1.0.0" readable-stream "^2.0.6" @@ -98,6 +148,24 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + +arr-flatten@^1.0.1, arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + array-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" @@ -123,7 +191,15 @@ array-uniq@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" -arrify@^1.0.0: +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + +arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -143,6 +219,14 @@ assert-plus@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + +astral-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + async-foreach@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" @@ -151,10 +235,24 @@ async-limiter@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" +async@^1.4.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@^2.1.4: + version "2.6.1" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" + dependencies: + lodash "^4.17.10" + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" +atob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.1.tgz#ae2d5a729477f289d60dd7f96a6314a22dd6c22a" + aws-sign2@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" @@ -175,7 +273,7 @@ babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: esutils "^2.0.2" js-tokens "^3.0.2" -babel-core@^6.26.0: +babel-core@^6.0.0, babel-core@^6.26.0: version "6.26.3" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" dependencies: @@ -199,7 +297,7 @@ babel-core@^6.26.0: slash "^1.0.0" source-map "^0.5.7" -babel-generator@^6.26.0: +babel-generator@^6.18.0, babel-generator@^6.26.0: version "6.26.1" resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" dependencies: @@ -341,6 +439,13 @@ babel-helpers@^6.24.1: babel-runtime "^6.22.0" babel-template "^6.24.1" +babel-jest@^23.0.1: + version "23.0.1" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.0.1.tgz#bbad3bf523fb202da05ed0a6540b48c84eed13a6" + dependencies: + babel-plugin-istanbul "^4.1.6" + babel-preset-jest "^23.0.1" + babel-messages@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" @@ -353,6 +458,19 @@ babel-plugin-check-es2015-constants@^6.22.0: dependencies: babel-runtime "^6.22.0" +babel-plugin-istanbul@^4.1.6: + version "4.1.6" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz#36c59b2192efce81c5b378321b74175add1c9a45" + dependencies: + babel-plugin-syntax-object-rest-spread "^6.13.0" + find-up "^2.1.0" + istanbul-lib-instrument "^1.10.1" + test-exclude "^4.2.1" + +babel-plugin-jest-hoist@^23.0.1: + version "23.0.1" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.0.1.tgz#eaa11c964563aea9c21becef2bdf7853f7f3c148" + babel-plugin-minify-builtins@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.3.0.tgz#4740117a6a784063aaf8f092989cf9e4bd484860" @@ -426,6 +544,10 @@ babel-plugin-syntax-exponentiation-operator@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" +babel-plugin-syntax-object-rest-spread@^6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" + babel-plugin-syntax-trailing-function-commas@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" @@ -619,20 +741,20 @@ babel-plugin-transform-inline-consecutive-adds@^0.3.0: resolved "https://registry.yarnpkg.com/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.3.0.tgz#f07d93689c0002ed2b2b62969bdd99f734e03f57" babel-plugin-transform-member-expression-literals@^6.9.0: - version "6.9.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-member-expression-literals/-/babel-plugin-transform-member-expression-literals-6.9.1.tgz#96be2e9968e7f5497333ae03284ecd5340405489" + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-member-expression-literals/-/babel-plugin-transform-member-expression-literals-6.9.4.tgz#37039c9a0c3313a39495faac2ff3a6b5b9d038bf" babel-plugin-transform-merge-sibling-variables@^6.9.0: - version "6.9.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-merge-sibling-variables/-/babel-plugin-transform-merge-sibling-variables-6.9.1.tgz#9071e443b21458ce6b0a8d3841ba5a174f5dc282" + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-merge-sibling-variables/-/babel-plugin-transform-merge-sibling-variables-6.9.4.tgz#85b422fc3377b449c9d1cde44087203532401dae" babel-plugin-transform-minify-booleans@^6.9.0: - version "6.9.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.9.1.tgz#52cba79c00fa509737064055efab22166e140c4d" + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.9.4.tgz#acbb3e56a3555dd23928e4b582d285162dd2b198" babel-plugin-transform-property-literals@^6.9.0: - version "6.9.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-property-literals/-/babel-plugin-transform-property-literals-6.9.1.tgz#6970f93b17793abcde9cf25d2e8cd13e0088e5c9" + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-property-literals/-/babel-plugin-transform-property-literals-6.9.4.tgz#98c1d21e255736573f93ece54459f6ce24985d39" dependencies: esutils "^2.0.2" @@ -647,12 +769,12 @@ babel-plugin-transform-regexp-constructors@^0.3.0: resolved "https://registry.yarnpkg.com/babel-plugin-transform-regexp-constructors/-/babel-plugin-transform-regexp-constructors-0.3.0.tgz#9bb2c8dd082271a5cb1b3a441a7c52e8fd07e0f5" babel-plugin-transform-remove-console@^6.9.0: - version "6.9.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.9.1.tgz#40fe95d98cae5811d8a0e1889812d78b12859651" + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.9.4.tgz#b980360c067384e24b357a588d807d3c83527780" babel-plugin-transform-remove-debugger@^6.9.0: - version "6.9.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-debugger/-/babel-plugin-transform-remove-debugger-6.9.1.tgz#76552d2e9d6c43d9c676bbfc08f3c2a2cc14be14" + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-debugger/-/babel-plugin-transform-remove-debugger-6.9.4.tgz#42b727631c97978e1eb2d199a7aec84a18339ef2" babel-plugin-transform-remove-undefined@^0.3.0: version "0.3.0" @@ -661,8 +783,8 @@ babel-plugin-transform-remove-undefined@^0.3.0: babel-helper-evaluate-path "^0.3.0" babel-plugin-transform-simplify-comparison-operators@^6.9.0: - version "6.9.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.9.1.tgz#5b0d06980a17a780f5318b274c00be2fb1c7c4fe" + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.9.4.tgz#f62afe096cab0e1f68a2d753fdf283888471ceb9" babel-plugin-transform-strict-mode@^6.24.1: version "6.24.1" @@ -672,12 +794,12 @@ babel-plugin-transform-strict-mode@^6.24.1: babel-types "^6.24.1" babel-plugin-transform-undefined-to-void@^6.9.0: - version "6.9.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-undefined-to-void/-/babel-plugin-transform-undefined-to-void-6.9.1.tgz#d7df9c1dd0ec12e0ffe895ed1445f61f1bf5e221" + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-undefined-to-void/-/babel-plugin-transform-undefined-to-void-6.9.4.tgz#be241ca81404030678b748717322b89d0c8fe280" babel-preset-env@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.1.tgz#a18b564cc9b9afdf4aae57ae3c1b0d99188e6f48" + version "1.7.0" + resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.7.0.tgz#dea79fa4ebeb883cd35dab07e260c1c9c04df77a" dependencies: babel-plugin-check-es2015-constants "^6.22.0" babel-plugin-syntax-trailing-function-commas "^6.22.0" @@ -706,10 +828,17 @@ babel-preset-env@^1.6.1: babel-plugin-transform-es2015-unicode-regex "^6.22.0" babel-plugin-transform-exponentiation-operator "^6.22.0" babel-plugin-transform-regenerator "^6.22.0" - browserslist "^2.1.2" + browserslist "^3.2.6" invariant "^2.2.2" semver "^5.3.0" +babel-preset-jest@^23.0.1: + version "23.0.1" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.0.1.tgz#631cc545c6cf021943013bcaf22f45d87fe62198" + dependencies: + babel-plugin-jest-hoist "^23.0.1" + babel-plugin-syntax-object-rest-spread "^6.13.0" + babel-preset-minify@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/babel-preset-minify/-/babel-preset-minify-0.3.0.tgz#7db64afa75f16f6e06c0aa5f25195f6f36784d77" @@ -757,7 +886,7 @@ babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: core-js "^2.4.0" regenerator-runtime "^0.11.0" -babel-template@^6.24.1, babel-template@^6.26.0: +babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" dependencies: @@ -767,7 +896,7 @@ babel-template@^6.24.1, babel-template@^6.26.0: babylon "^6.18.0" lodash "^4.17.4" -babel-traverse@^6.24.1, babel-traverse@^6.26.0: +babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" dependencies: @@ -781,7 +910,7 @@ babel-traverse@^6.24.1, babel-traverse@^6.26.0: invariant "^2.2.2" lodash "^4.17.4" -babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: +babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" dependencies: @@ -798,6 +927,18 @@ balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + bcrypt-pbkdf@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" @@ -816,18 +957,6 @@ boom@2.x.x: dependencies: hoek "2.x.x" -boom@4.x.x: - version "4.3.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31" - dependencies: - hoek "4.x.x" - -boom@5.x.x: - version "5.2.0" - resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02" - dependencies: - hoek "4.x.x" - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -835,25 +964,74 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +braces@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + browser-process-hrtime@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz#425d68a58d3447f02a04aa894187fce8af8b7b8e" -browserslist@^2.1.2: - version "2.11.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.11.3.tgz#fe36167aed1bbcde4827ebfe71347a2cc70b99b2" +browser-resolve@^1.11.2: + version "1.11.2" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" dependencies: - caniuse-lite "^1.0.30000792" - electron-to-chromium "^1.3.30" + resolve "1.1.7" + +browserslist@^3.2.6: + version "3.2.8" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.8.tgz#b0005361d6471f0f5952797a76fc985f1f978fc6" + dependencies: + caniuse-lite "^1.0.30000844" + electron-to-chromium "^1.3.47" + +bser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" + dependencies: + node-int64 "^0.4.0" buffer-from@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.0.0.tgz#4cb8832d23612589b0406e9e2956c17f06fdf531" + version "1.1.0" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.0.tgz#87fcaa3a298358e0ade6e442cfce840740d1ad04" builtin-modules@^1.0.0, builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + caller-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" @@ -864,6 +1042,10 @@ callsites@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + camel-case@3.0.x: version "3.0.0" resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" @@ -878,6 +1060,10 @@ camelcase-keys@^2.0.0: camelcase "^2.0.0" map-obj "^1.0.0" +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + camelcase@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" @@ -886,9 +1072,19 @@ camelcase@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" -caniuse-lite@^1.0.30000792: - version "1.0.30000833" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000833.tgz#98e84fcdb4399c6fa0b0fd41490d3217ac7802b4" +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + +caniuse-lite@^1.0.30000844: + version "1.0.30000856" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000856.tgz#ecc16978135a6f219b138991eb62009d25ee8daa" + +capture-exit@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-1.2.0.tgz#1c5fcc489fd0ab00d4f1ac7ae1072e3173fbab6f" + dependencies: + rsvp "^3.3.3" caseless@~0.11.0: version "0.11.0" @@ -898,7 +1094,14 @@ caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" -chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: @@ -908,7 +1111,7 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.1: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" dependencies: @@ -920,10 +1123,27 @@ chardet@^0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" +chownr@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" + +ci-info@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.3.tgz#710193264bb05c77b8c90d02f5aaf22216a667b2" + circular-json@^0.3.1: version "0.3.3" resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + clean-css@4.1.x: version "4.1.11" resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.11.tgz#2ecdf145aba38f54740f26cefd0ff3e03e125d6a" @@ -948,6 +1168,14 @@ clipboard@^2.0.0: select "^1.1.2" tiny-emitter "^2.0.0" +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + cliui@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" @@ -956,6 +1184,14 @@ cliui@^3.2.0: strip-ansi "^3.0.1" wrap-ansi "^2.0.0" +cliui@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" + dependencies: + string-width "^2.1.1" + strip-ansi "^4.0.0" + wrap-ansi "^2.0.0" + co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -964,15 +1200,22 @@ code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" -color-convert@^1.9.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" dependencies: - color-name "^1.1.1" + map-visit "^1.0.0" + object-visit "^1.0.0" -color-name@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" +color-convert@^1.9.0: + version "1.9.2" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.2.tgz#49881b8fba67df12a96bdf3f56c0aab9e7913147" + dependencies: + color-name "1.1.1" + +color-name@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689" combined-stream@1.0.6, combined-stream@^1.0.5, combined-stream@~1.0.5: version "1.0.6" @@ -984,6 +1227,14 @@ commander@2.15.x, commander@^2.9.0, commander@~2.15.0: version "2.15.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" +compare-versions@^3.1.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.3.0.tgz#af93ea705a96943f622ab309578b9b90586f39c3" + +component-emitter@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -1005,17 +1256,21 @@ contains-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" -convert-source-map@^1.5.1: +convert-source-map@^1.4.0, convert-source-map@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + core-js@^1.0.0: version "1.2.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" core-js@^2.4.0, core-js@^2.5.0: - version "2.5.5" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.5.tgz#b14dde936c640c0579a6b50cabcc132dd6127e3b" + version "2.5.7" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -1028,7 +1283,7 @@ cross-spawn@^3.0.0: lru-cache "^4.0.1" which "^1.2.9" -cross-spawn@^5.1.0: +cross-spawn@^5.0.1, cross-spawn@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" dependencies: @@ -1042,19 +1297,13 @@ cryptiles@2.x.x: dependencies: boom "2.x.x" -cryptiles@3.x.x: - version "3.1.2" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe" - dependencies: - boom "5.x.x" - cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": version "0.3.2" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" -"cssstyle@>= 0.2.37 < 0.3.0": - version "0.2.37" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" +"cssstyle@>= 0.3.1 < 0.4.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.3.1.tgz#6da9b4cff1bc5d716e6e5fe8e04fcb1b50a49adf" dependencies: cssom "0.3.x" @@ -1082,7 +1331,7 @@ debug-log@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f" -debug@^2.6.8, debug@^2.6.9: +debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: @@ -1094,18 +1343,28 @@ debug@^3.1.0: dependencies: ms "2.0.0" -decamelize@^1.1.1, decamelize@^1.1.2: +decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" -deep-equal@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" +default-require-extensions@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-2.0.0.tgz#f5f8fbb18a7d6d50b21f641f649ebb522cfe24f7" + dependencies: + strip-bom "^3.0.0" + define-properties@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" @@ -1113,13 +1372,28 @@ define-properties@^1.1.2: foreach "^2.0.5" object-keys "^1.0.8" -defined@~1.0.0: +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" deglob@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/deglob/-/deglob-2.1.0.tgz#4d44abe16ef32c779b4972bd141a80325029a14a" + version "2.1.1" + resolved "https://registry.yarnpkg.com/deglob/-/deglob-2.1.1.tgz#d268e168727799862e8eac07042e165957c1f3be" dependencies: find-root "^1.0.0" glob "^7.0.5" @@ -1162,6 +1436,18 @@ detect-indent@^4.0.0: dependencies: repeating "^2.0.0" +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + +detect-newline@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" + +diff@^3.2.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + doctrine@1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" @@ -1181,19 +1467,15 @@ domexception@^1.0.0: dependencies: webidl-conversions "^4.0.2" -duplexer@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" - ecc-jsbn@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" dependencies: jsbn "~0.1.0" -electron-to-chromium@^1.3.30: - version "1.3.45" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.45.tgz#458ac1b1c5c760ce8811a16d2bfbd97ec30bafb8" +electron-to-chromium@^1.3.47: + version "1.3.48" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.48.tgz#d3b0d8593814044e092ece2108fc3ac9aea4b900" encoding@^0.1.11: version "0.1.12" @@ -1211,9 +1493,9 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.5.0, es-abstract@^1.7.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.11.0.tgz#cce87d518f0496893b1a30cd8461835535480681" +es-abstract@^1.4.3, es-abstract@^1.5.1, es-abstract@^1.7.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" dependencies: es-to-primitive "^1.1.1" function-bind "^1.1.1" @@ -1234,8 +1516,8 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" escodegen@^1.9.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.1.tgz#dbae17ef96c8e4bedb1356f4504fa4cc2f7cb7e2" + version "1.10.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.10.0.tgz#f647395de22519fbd0d928ffcf1d17e0dec2603e" dependencies: esprima "^3.1.3" estraverse "^4.2.0" @@ -1403,6 +1685,76 @@ esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" +exec-sh@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.1.tgz#163b98a6e89e6b65b47c2a28d215bc1f63989c38" + dependencies: + merge "^1.1.3" + +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +exit@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +expect@^23.1.0: + version "23.1.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-23.1.0.tgz#bfdfd57a2a20170d875999ee9787cc71f01c205f" + dependencies: + ansi-styles "^3.2.0" + jest-diff "^23.0.1" + jest-get-type "^22.1.0" + jest-matcher-utils "^23.0.1" + jest-message-util "^23.1.0" + jest-regex-util "^23.0.0" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + extend@~3.0.0, extend@~3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" @@ -1415,6 +1767,25 @@ external-editor@^2.0.4: iconv-lite "^0.4.17" tmp "^0.0.33" +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" @@ -1435,9 +1806,15 @@ fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" +fb-watchman@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" + dependencies: + bser "^2.0.0" + fbjs@^0.8.16: - version "0.8.16" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db" + version "0.8.17" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" dependencies: core-js "^1.0.0" isomorphic-fetch "^2.1.1" @@ -1445,14 +1822,7 @@ fbjs@^0.8.16: object-assign "^4.1.0" promise "^7.1.1" setimmediate "^1.0.5" - ua-parser-js "^0.7.9" - -figures@^1.4.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" - dependencies: - escape-string-regexp "^1.0.5" - object-assign "^4.1.0" + ua-parser-js "^0.7.18" figures@^2.0.0: version "2.0.0" @@ -1467,6 +1837,36 @@ file-entry-cache@^2.0.0: flat-cache "^1.2.1" object-assign "^4.0.1" +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +fileset@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" + dependencies: + glob "^7.0.3" + minimatch "^3.0.3" + +fill-range@^2.1.0: + version "2.2.4" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^3.0.0" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + find-root@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" @@ -1478,7 +1878,7 @@ find-up@^1.0.0: path-exists "^2.0.0" pinkie-promise "^2.0.0" -find-up@^2.0.0: +find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" dependencies: @@ -1493,11 +1893,15 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -for-each@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.2.tgz#2c40450b9348e97f281322593ba96704b9abd4d4" +for-in@^1.0.1, for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" dependencies: - is-function "~1.0.0" + for-in "^1.0.1" foreach@^2.0.5: version "2.0.5" @@ -1523,18 +1927,37 @@ form-data@~2.3.1: combined-stream "1.0.6" mime-types "^2.1.12" +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + dependencies: + map-cache "^0.2.2" + fs-extra@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-6.0.0.tgz#0f0afb290bb3deb87978da816fcd3c7797f3a817" + version "6.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-6.0.1.tgz#8abc128f7946e310135ddc93b98bddb410e7a34b" dependencies: graceful-fs "^4.1.2" jsonfile "^4.0.0" universalify "^0.1.0" +fs-minipass@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" + dependencies: + minipass "^2.2.1" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" +fsevents@^1.2.3: + version "1.2.4" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" + dependencies: + nan "^2.9.2" + node-pre-gyp "^0.10.0" + fstream@^1.0.0, fstream@^1.0.2: version "1.0.11" resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" @@ -1544,7 +1967,7 @@ fstream@^1.0.0, fstream@^1.0.2: mkdirp ">=0.5 0" rimraf "2" -function-bind@^1.0.2, function-bind@^1.1.1, function-bind@~1.1.1: +function-bind@^1.0.2, function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -1566,8 +1989,8 @@ gauge@~2.7.3: wide-align "^1.1.0" gaze@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.2.tgz#847224677adb8870d679257ed3388fdb61e40105" + version "1.1.3" + resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.3.tgz#c441733e13b927ac8c0ff0b4c3b033f28812924a" dependencies: globule "^1.0.0" @@ -1593,12 +2016,33 @@ get-stdin@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" dependencies: assert-plus "^1.0.0" +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + glob@^6.0.4: version "6.0.4" resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22" @@ -1609,7 +2053,7 @@ glob@^6.0.4: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.2, glob@~7.1.1, glob@~7.1.2: +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@~7.1.1: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: @@ -1640,11 +2084,11 @@ globby@^5.0.0: pinkie-promise "^2.0.0" globule@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/globule/-/globule-1.2.0.tgz#1dc49c6822dd9e8a2fa00ba2a295006e8664bd09" + version "1.2.1" + resolved "https://registry.yarnpkg.com/globule/-/globule-1.2.1.tgz#5dffb1b191f22d20797a9369b49eab4e9839696d" dependencies: glob "~7.1.1" - lodash "~4.17.4" + lodash "~4.17.10" minimatch "~3.0.2" good-listener@^1.2.2: @@ -1653,10 +2097,28 @@ good-listener@^1.2.2: dependencies: delegate "^3.1.2" -graceful-fs@^4.1.2, graceful-fs@^4.1.6: +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" +growly@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" + +handlebars@^4.0.3: + version "4.0.11" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" + dependencies: + async "^1.4.0" + optimist "^0.6.1" + source-map "^0.4.4" + optionalDependencies: + uglify-js "^2.6" + +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" @@ -1670,6 +2132,13 @@ har-validator@~2.0.6: is-my-json-valid "^2.12.4" pinkie-promise "^2.0.0" +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + dependencies: + ajv "^4.9.1" + har-schema "^1.0.5" + har-validator@~5.0.3: version "5.0.3" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" @@ -1683,6 +2152,10 @@ has-ansi@^2.0.0: dependencies: ansi-regex "^2.0.0" +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -1691,11 +2164,38 @@ has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" -has@^1.0.1, has@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" dependencies: - function-bind "^1.0.2" + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + dependencies: + function-bind "^1.1.1" hawk@~3.1.3: version "3.1.3" @@ -1706,15 +2206,6 @@ hawk@~3.1.3: hoek "2.x.x" sntp "1.x.x" -hawk@~6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038" - dependencies: - boom "4.x.x" - cryptiles "3.x.x" - hoek "4.x.x" - sntp "2.x.x" - he@1.1.x: version "1.1.1" resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" @@ -1723,10 +2214,6 @@ hoek@2.x.x: version "2.16.3" resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" -hoek@4.x.x: - version "4.2.1" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb" - home-or-tmp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" @@ -1745,8 +2232,8 @@ html-encoding-sniffer@^1.0.2: whatwg-encoding "^1.0.1" html-minifier@^3.5.15: - version "3.5.15" - resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.15.tgz#f869848d4543cbfd84f26d5514a2a87cbf9a05e0" + version "3.5.16" + resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.16.tgz#39f5aabaf78bdfc057fe67334226efd7f3851175" dependencies: camel-case "3.0.x" clean-css "4.1.x" @@ -1776,16 +2263,29 @@ iconv-lite@0.4.19: version "0.4.19" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" -iconv-lite@^0.4.17, iconv-lite@~0.4.13: - version "0.4.21" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.21.tgz#c47f8733d02171189ebc4a400f3218d348094798" +iconv-lite@^0.4.17, iconv-lite@^0.4.4, iconv-lite@~0.4.13: + version "0.4.23" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" dependencies: - safer-buffer "^2.1.0" + safer-buffer ">= 2.1.2 < 3" + +ignore-walk@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" + dependencies: + minimatch "^3.0.4" ignore@^3.0.9, ignore@^3.3.3, ignore@^3.3.6: version "3.3.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.8.tgz#3f8e9c35d38708a3a7e0e9abb6c73e7ee7707b2b" +import-local@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" + dependencies: + pkg-dir "^2.0.0" + resolve-cwd "^2.0.0" + imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -1811,6 +2311,10 @@ inherits@2, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" +ini@~1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + inquirer@^3.0.6: version "3.3.0" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" @@ -1840,10 +2344,26 @@ invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + dependencies: + kind-of "^6.0.0" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + is-builtin-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" @@ -1854,11 +2374,69 @@ is-callable@^1.1.1, is-callable@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" +is-ci@^1.0.10: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.1.0.tgz#247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5" + dependencies: + ci-info "^1.0.0" + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + dependencies: + kind-of "^6.0.0" + is-date-object@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" -is-finite@^1.0.0, is-finite@^1.0.1: +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-finite@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" dependencies: @@ -1874,9 +2452,15 @@ is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" -is-function@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.1.tgz#12cfb98b65b57dd3d193a3121f5f6e2f437602b5" +is-generator-fn@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" is-my-ip-valid@^1.0.0: version "1.0.0" @@ -1892,6 +2476,28 @@ is-my-json-valid@^2.12.4: jsonpointer "^4.0.0" xtend "^4.0.0" +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + dependencies: + kind-of "^3.0.2" + +is-number@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + +is-odd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-2.0.0.tgz#7646624671fd7ea558ccd9a2795182f2958f1b24" + dependencies: + is-number "^4.0.0" + is-path-cwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" @@ -1908,6 +2514,20 @@ is-path-inside@^1.0.0: dependencies: path-is-inside "^1.0.1" +is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + dependencies: + isobject "^3.0.1" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" @@ -1926,7 +2546,7 @@ is-resolvable@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" -is-stream@^1.0.1: +is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -1942,7 +2562,11 @@ is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" -isarray@^1.0.0, isarray@~1.0.0: +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -1950,6 +2574,16 @@ isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + isomorphic-fetch@^2.1.1: version "2.2.1" resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" @@ -1961,17 +2595,374 @@ isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" +istanbul-api@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.1.tgz#4c3b05d18c0016d1022e079b98dc82c40f488954" + dependencies: + async "^2.1.4" + compare-versions "^3.1.0" + fileset "^2.0.2" + istanbul-lib-coverage "^1.2.0" + istanbul-lib-hook "^1.2.0" + istanbul-lib-instrument "^1.10.1" + istanbul-lib-report "^1.1.4" + istanbul-lib-source-maps "^1.2.4" + istanbul-reports "^1.3.0" + js-yaml "^3.7.0" + mkdirp "^0.5.1" + once "^1.4.0" + +istanbul-lib-coverage@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz#f7d8f2e42b97e37fe796114cb0f9d68b5e3a4341" + +istanbul-lib-hook@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.1.tgz#f614ec45287b2a8fc4f07f5660af787575601805" + dependencies: + append-transform "^1.0.0" + +istanbul-lib-instrument@^1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz#724b4b6caceba8692d3f1f9d0727e279c401af7b" + dependencies: + babel-generator "^6.18.0" + babel-template "^6.16.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + babylon "^6.18.0" + istanbul-lib-coverage "^1.2.0" + semver "^5.3.0" + +istanbul-lib-report@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz#e886cdf505c4ebbd8e099e4396a90d0a28e2acb5" + dependencies: + istanbul-lib-coverage "^1.2.0" + mkdirp "^0.5.1" + path-parse "^1.0.5" + supports-color "^3.1.2" + +istanbul-lib-source-maps@^1.2.4: + version "1.2.5" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.5.tgz#ffe6be4e7ab86d3603e4290d54990b14506fc9b1" + dependencies: + debug "^3.1.0" + istanbul-lib-coverage "^1.2.0" + mkdirp "^0.5.1" + rimraf "^2.6.1" + source-map "^0.5.3" + +istanbul-reports@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.3.0.tgz#2f322e81e1d9520767597dca3c20a0cce89a3554" + dependencies: + handlebars "^4.0.3" + +jest-changed-files@^23.0.1: + version "23.0.1" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-23.0.1.tgz#f79572d0720844ea5df84c2a448e862c2254f60c" + dependencies: + throat "^4.0.0" + +jest-cli@^23.1.0: + version "23.1.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.1.0.tgz#eb8bdd4ce0d15250892e31ad9b69bc99d2a8f6bf" + dependencies: + ansi-escapes "^3.0.0" + chalk "^2.0.1" + exit "^0.1.2" + glob "^7.1.2" + graceful-fs "^4.1.11" + import-local "^1.0.0" + is-ci "^1.0.10" + istanbul-api "^1.3.1" + istanbul-lib-coverage "^1.2.0" + istanbul-lib-instrument "^1.10.1" + istanbul-lib-source-maps "^1.2.4" + jest-changed-files "^23.0.1" + jest-config "^23.1.0" + jest-environment-jsdom "^23.1.0" + jest-get-type "^22.1.0" + jest-haste-map "^23.1.0" + jest-message-util "^23.1.0" + jest-regex-util "^23.0.0" + jest-resolve-dependencies "^23.0.1" + jest-runner "^23.1.0" + jest-runtime "^23.1.0" + jest-snapshot "^23.0.1" + jest-util "^23.1.0" + jest-validate "^23.0.1" + jest-watcher "^23.1.0" + jest-worker "^23.0.1" + micromatch "^2.3.11" + node-notifier "^5.2.1" + realpath-native "^1.0.0" + rimraf "^2.5.4" + slash "^1.0.0" + string-length "^2.0.0" + strip-ansi "^4.0.0" + which "^1.2.12" + yargs "^11.0.0" + +jest-config@^23.1.0: + version "23.1.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.1.0.tgz#708ca0f431d356ee424fb4895d3308006bdd8241" + dependencies: + babel-core "^6.0.0" + babel-jest "^23.0.1" + chalk "^2.0.1" + glob "^7.1.1" + jest-environment-jsdom "^23.1.0" + jest-environment-node "^23.1.0" + jest-get-type "^22.1.0" + jest-jasmine2 "^23.1.0" + jest-regex-util "^23.0.0" + jest-resolve "^23.1.0" + jest-util "^23.1.0" + jest-validate "^23.0.1" + pretty-format "^23.0.1" + +jest-diff@^23.0.1: + version "23.0.1" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.0.1.tgz#3d49137cee12c320a4b4d2b4a6fa6e82d491a16a" + dependencies: + chalk "^2.0.1" + diff "^3.2.0" + jest-get-type "^22.1.0" + pretty-format "^23.0.1" + +jest-docblock@^23.0.1: + version "23.0.1" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-23.0.1.tgz#deddd18333be5dc2415260a04ef3fce9276b5725" + dependencies: + detect-newline "^2.1.0" + +jest-each@^23.1.0: + version "23.1.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.1.0.tgz#16146b592c354867a5ae5e13cdf15c6c65b696c6" + dependencies: + chalk "^2.0.1" + pretty-format "^23.0.1" + +jest-environment-jsdom@^23.1.0: + version "23.1.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.1.0.tgz#85929914e23bed3577dac9755f4106d0697c479c" + dependencies: + jest-mock "^23.1.0" + jest-util "^23.1.0" + jsdom "^11.5.1" + +jest-environment-node@^23.1.0: + version "23.1.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.1.0.tgz#452c0bf949cfcbbacda1e1762eeed70bc784c7d5" + dependencies: + jest-mock "^23.1.0" + jest-util "^23.1.0" + +jest-get-type@^22.1.0: + version "22.4.3" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4" + +jest-haste-map@^23.1.0: + version "23.1.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.1.0.tgz#18e6c7d5a8d27136f91b7d9852f85de0c7074c49" + dependencies: + fb-watchman "^2.0.0" + graceful-fs "^4.1.11" + jest-docblock "^23.0.1" + jest-serializer "^23.0.1" + jest-worker "^23.0.1" + micromatch "^2.3.11" + sane "^2.0.0" + +jest-jasmine2@^23.1.0: + version "23.1.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.1.0.tgz#4afab31729b654ddcd2b074add849396f13b30b8" + dependencies: + chalk "^2.0.1" + co "^4.6.0" + expect "^23.1.0" + is-generator-fn "^1.0.0" + jest-diff "^23.0.1" + jest-each "^23.1.0" + jest-matcher-utils "^23.0.1" + jest-message-util "^23.1.0" + jest-snapshot "^23.0.1" + jest-util "^23.1.0" + pretty-format "^23.0.1" + +jest-leak-detector@^23.0.1: + version "23.0.1" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.0.1.tgz#9dba07505ac3495c39d3ec09ac1e564599e861a0" + dependencies: + pretty-format "^23.0.1" + +jest-matcher-utils@^23.0.1: + version "23.0.1" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.0.1.tgz#0c6c0daedf9833c2a7f36236069efecb4c3f6e5f" + dependencies: + chalk "^2.0.1" + jest-get-type "^22.1.0" + pretty-format "^23.0.1" + +jest-message-util@^23.1.0: + version "23.1.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.1.0.tgz#9a809ba487ecac5ce511d4e698ee3b5ee2461ea9" + dependencies: + "@babel/code-frame" "^7.0.0-beta.35" + chalk "^2.0.1" + micromatch "^2.3.11" + slash "^1.0.0" + stack-utils "^1.0.1" + +jest-mock@^23.1.0: + version "23.1.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.1.0.tgz#a381c31b121ab1f60c462a2dadb7b86dcccac487" + +jest-regex-util@^23.0.0: + version "23.0.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.0.0.tgz#dd5c1fde0c46f4371314cf10f7a751a23f4e8f76" + +jest-resolve-dependencies@^23.0.1: + version "23.0.1" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.0.1.tgz#d01a10ddad9152c4cecdf5eac2b88571c4b6a64d" + dependencies: + jest-regex-util "^23.0.0" + jest-snapshot "^23.0.1" + +jest-resolve@^23.1.0: + version "23.1.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.1.0.tgz#b9e316eecebd6f00bc50a3960d1527bae65792d2" + dependencies: + browser-resolve "^1.11.2" + chalk "^2.0.1" + realpath-native "^1.0.0" + +jest-runner@^23.1.0: + version "23.1.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.1.0.tgz#fa20a933fff731a5432b3561e7f6426594fa29b5" + dependencies: + exit "^0.1.2" + graceful-fs "^4.1.11" + jest-config "^23.1.0" + jest-docblock "^23.0.1" + jest-haste-map "^23.1.0" + jest-jasmine2 "^23.1.0" + jest-leak-detector "^23.0.1" + jest-message-util "^23.1.0" + jest-runtime "^23.1.0" + jest-util "^23.1.0" + jest-worker "^23.0.1" + source-map-support "^0.5.6" + throat "^4.0.0" + +jest-runtime@^23.1.0: + version "23.1.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.1.0.tgz#b4ae0e87259ecacfd4a884b639db07cf4dd620af" + dependencies: + babel-core "^6.0.0" + babel-plugin-istanbul "^4.1.6" + chalk "^2.0.1" + convert-source-map "^1.4.0" + exit "^0.1.2" + fast-json-stable-stringify "^2.0.0" + graceful-fs "^4.1.11" + jest-config "^23.1.0" + jest-haste-map "^23.1.0" + jest-message-util "^23.1.0" + jest-regex-util "^23.0.0" + jest-resolve "^23.1.0" + jest-snapshot "^23.0.1" + jest-util "^23.1.0" + jest-validate "^23.0.1" + micromatch "^2.3.11" + realpath-native "^1.0.0" + slash "^1.0.0" + strip-bom "3.0.0" + write-file-atomic "^2.1.0" + yargs "^11.0.0" + +jest-serializer@^23.0.1: + version "23.0.1" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-23.0.1.tgz#a3776aeb311e90fe83fab9e533e85102bd164165" + +jest-snapshot@^23.0.1: + version "23.0.1" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.0.1.tgz#6674fa19b9eb69a99cabecd415bddc42d6af3e7e" + dependencies: + chalk "^2.0.1" + jest-diff "^23.0.1" + jest-matcher-utils "^23.0.1" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + pretty-format "^23.0.1" + +jest-tap-reporter@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/jest-tap-reporter/-/jest-tap-reporter-1.9.0.tgz#bf3364a97116454b5f34d73cf9cda16e2cb318d1" + dependencies: + "@babel/code-frame" "7.0.0-beta.36" + chalk "^2.3.0" + string.prototype.padend "^3.0.0" + string.prototype.padstart "^3.0.0" + strip-ansi "4.0.0" + utf8-bar "0.1.0" + +jest-util@^23.1.0: + version "23.1.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.1.0.tgz#c0251baf34644c6dd2fea78a962f4263ac55772d" + dependencies: + callsites "^2.0.0" + chalk "^2.0.1" + graceful-fs "^4.1.11" + is-ci "^1.0.10" + jest-message-util "^23.1.0" + mkdirp "^0.5.1" + slash "^1.0.0" + source-map "^0.6.0" + +jest-validate@^23.0.1: + version "23.0.1" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.0.1.tgz#cd9f01a89d26bb885f12a8667715e9c865a5754f" + dependencies: + chalk "^2.0.1" + jest-get-type "^22.1.0" + leven "^2.1.0" + pretty-format "^23.0.1" + +jest-watcher@^23.1.0: + version "23.1.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-23.1.0.tgz#a8d5842e38d9fb4afff823df6abb42a58ae6cdbd" + dependencies: + ansi-escapes "^3.0.0" + chalk "^2.0.1" + string-length "^2.0.0" + +jest-worker@^23.0.1: + version "23.0.1" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-23.0.1.tgz#9e649dd963ff4046026f91c4017f039a6aa4a7bc" + dependencies: + merge-stream "^1.0.1" + +jest@^23.1.0: + version "23.1.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-23.1.0.tgz#bbb7f893100a11a742dd8bd0d047a54b0968ad1a" + dependencies: + import-local "^1.0.0" + jest-cli "^23.1.0" + js-base64@^2.1.8: - version "2.4.3" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.3.tgz#2e545ec2b0f2957f41356510205214e98fad6582" + version "2.4.5" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.5.tgz#e293cd3c7c82f070d700fc7a1ca0a2e69f101f92" js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" -js-yaml@^3.9.1: - version "3.11.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef" +js-yaml@^3.7.0, js-yaml@^3.9.1: + version "3.12.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -1980,22 +2971,22 @@ jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" -jsdom@^11.10.0: - version "11.10.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.10.0.tgz#a42cd54e88895dc765f03f15b807a474962ac3b5" +jsdom@^11.5.1: + version "11.11.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.11.0.tgz#df486efad41aee96c59ad7a190e2449c7eb1110e" dependencies: abab "^1.0.4" acorn "^5.3.0" acorn-globals "^4.1.0" array-equal "^1.0.0" cssom ">= 0.3.2 < 0.4.0" - cssstyle ">= 0.2.37 < 0.3.0" + cssstyle ">= 0.3.1 < 0.4.0" data-urls "^1.0.0" domexception "^1.0.0" escodegen "^1.9.0" html-encoding-sniffer "^1.0.2" left-pad "^1.2.0" - nwmatcher "^1.4.3" + nwsapi "^2.0.0" parse5 "4.0.0" pn "^1.1.0" request "^2.83.0" @@ -2007,7 +2998,7 @@ jsdom@^11.10.0: webidl-conversions "^4.0.2" whatwg-encoding "^1.0.3" whatwg-mimetype "^2.1.0" - whatwg-url "^6.4.0" + whatwg-url "^6.4.1" ws "^4.0.0" xml-name-validator "^3.0.0" @@ -2035,6 +3026,12 @@ json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" @@ -2049,6 +3046,10 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + jsonpointer@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" @@ -2068,6 +3069,30 @@ jsx-ast-utils@^2.0.1: dependencies: array-includes "^3.0.3" +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + lcid@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" @@ -2078,6 +3103,10 @@ left-pad@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" +leven@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" + levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" @@ -2154,14 +3183,14 @@ lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" -lodash@^3.6.0: - version "3.10.1" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" - -lodash@^4.0.0, lodash@^4.13.1, lodash@^4.17.4, lodash@^4.3.0, lodash@~4.17.4: +lodash@^4.0.0, lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.3.0, lodash@~4.17.10: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + loose-envify@^1.0.0, loose-envify@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" @@ -2180,8 +3209,8 @@ lower-case@^1.1.1: resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" lru-cache@^4.0.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.2.tgz#45234b2e6e2f2b33da125624c4664929a0224c3f" + version "4.1.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" dependencies: pseudomap "^1.0.2" yallist "^2.1.2" @@ -2192,10 +3221,26 @@ magic-string@^0.22.4: dependencies: vlq "^0.2.2" +makeerror@1.0.x: + version "1.0.11" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" + dependencies: + tmpl "1.0.x" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + map-obj@^1.0.0, map-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + dependencies: + object-visit "^1.0.0" + markdown-it@^8.4.1: version "8.4.1" resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.4.1.tgz#206fe59b0e4e1b78a7c73250af9b34a4ad0aaf44" @@ -2206,10 +3251,20 @@ markdown-it@^8.4.1: mdurl "^1.0.1" uc.micro "^1.0.5" +math-random@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac" + mdurl@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + dependencies: + mimic-fn "^1.0.0" + meow@^3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" @@ -2225,6 +3280,52 @@ meow@^3.7.0: redent "^1.0.0" trim-newlines "^1.0.0" +merge-stream@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" + dependencies: + readable-stream "^2.0.1" + +merge@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" + +micromatch@^2.3.11: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +micromatch@^3.1.4, micromatch@^3.1.8: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + mime-db@~1.33.0: version "1.33.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" @@ -2253,10 +3354,34 @@ minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" -minimist@^1.1.0, minimist@^1.1.3, minimist@~1.2.0: +minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + +minipass@^2.2.1, minipass@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.3.tgz#a7dcc8b7b833f5d368759cce544dccb55f50f233" + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.0.tgz#11e13658ce46bc3a70a267aac58359d1e0c29ceb" + dependencies: + minipass "^2.2.1" + +mixin-deep@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" @@ -2271,14 +3396,39 @@ mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" -nan@^2.10.0: +nan@^2.10.0, nan@^2.9.2: version "2.10.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" +nanomatch@^1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.9.tgz#879f7150cb2dab7a471259066c104eee6e0fa7c2" + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-odd "^2.0.0" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" +needle@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.1.tgz#b5e325bd3aae8c2678902fa296f729455d1d3a7d" + dependencies: + debug "^2.1.2" + iconv-lite "^0.4.4" + sax "^1.2.4" + no-case@^2.2.0: version "2.3.2" resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" @@ -2293,23 +3443,50 @@ node-fetch@^1.0.1: is-stream "^1.0.1" node-gyp@^3.3.1: - version "3.6.2" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.6.2.tgz#9bfbe54562286284838e750eac05295853fa1c60" + version "3.7.0" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.7.0.tgz#789478e8f6c45e277aa014f3e28f958f286f9203" dependencies: fstream "^1.0.0" glob "^7.0.3" graceful-fs "^4.1.2" - minimatch "^3.0.2" mkdirp "^0.5.0" nopt "2 || 3" npmlog "0 || 1 || 2 || 3 || 4" osenv "0" - request "2" + request ">=2.9.0 <2.82.0" rimraf "2" semver "~5.3.0" tar "^2.0.0" which "1" +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + +node-notifier@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.2.1.tgz#fa313dd08f5517db0e2502e5758d664ac69f9dea" + dependencies: + growly "^1.3.0" + semver "^5.4.1" + shellwords "^0.1.1" + which "^1.3.0" + +node-pre-gyp@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.0.tgz#6e4ef5bb5c5203c6552448828c852c40111aac46" + dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.0" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.1.7" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^4" + node-sass@^4.9.0: version "4.9.0" resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.9.0.tgz#d1b8aa855d98ed684d6848db929a20771cc2ae52" @@ -2340,6 +3517,13 @@ node-sass@^4.9.0: dependencies: abbrev "1" +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + dependencies: + abbrev "1" + osenv "^0.1.4" + normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: version "2.4.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" @@ -2349,7 +3533,30 @@ normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0: +normalize-path@^2.0.1, normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +npm-bundled@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.3.tgz#7e71703d973af3370a9591bafe3a63aca0be2308" + +npm-packlist@^1.1.6: + version "1.1.10" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.10.tgz#1039db9e985727e464df066f4cf0ab6ef85c398a" + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + dependencies: + path-key "^2.0.0" + +"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" dependencies: @@ -2362,9 +3569,9 @@ number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" -nwmatcher@^1.4.3: - version "1.4.4" - resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.4.tgz#2285631f34a95f0d0395cd900c96ed39b58f346e" +nwsapi@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.0.4.tgz#dc79040a5f77b97716dc79565fc7fc3ef7d50570" oauth-sign@~0.8.1, oauth-sign@~0.8.2: version "0.8.2" @@ -2374,21 +3581,51 @@ object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" -object-inspect@~1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.5.0.tgz#9d876c11e40f485c79215670281b767488f9bfe3" +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" object-keys@^1.0.8: version "1.0.11" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + dependencies: + isobject "^3.0.0" + +object.getownpropertydescriptors@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.5.1" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + dependencies: + isobject "^3.0.1" + octicons@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/octicons/-/octicons-7.2.0.tgz#a721635f73c774d7ffda56a83a29dbde03fc4b53" + version "7.3.0" + resolved "https://registry.yarnpkg.com/octicons/-/octicons-7.3.0.tgz#ad2612b483cd4da4f655384294787cb2967beb17" dependencies: object-assign "^4.1.1" -once@^1.3.0: +once@^1.3.0, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: @@ -2400,6 +3637,13 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" +optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + optionator@^0.8.1, optionator@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" @@ -2421,20 +3665,32 @@ os-locale@^1.4.0: dependencies: lcid "^1.0.0" +os-locale@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" + dependencies: + execa "^0.7.0" + lcid "^1.0.0" + mem "^1.1.0" + os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" -osenv@0: +osenv@0, osenv@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" dependencies: os-homedir "^1.0.0" os-tmpdir "^1.0.0" +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + p-limit@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c" + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" dependencies: p-try "^1.0.0" @@ -2454,6 +3710,15 @@ param-case@2.1.x: dependencies: no-case "^2.2.0" +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" @@ -2467,14 +3732,14 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" -parse-ms@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parse-ms/-/parse-ms-1.0.1.tgz#56346d4749d78f23430ca0c713850aef91aa361d" - parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + path-exists@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" @@ -2493,6 +3758,10 @@ path-is-inside@^1.0.1, path-is-inside@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" +path-key@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + path-parse@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" @@ -2511,6 +3780,10 @@ path-type@^2.0.0: dependencies: pify "^2.0.0" +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" @@ -2554,9 +3827,11 @@ pkg-dir@^1.0.0: dependencies: find-up "^1.0.0" -plur@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/plur/-/plur-1.0.0.tgz#db85c6814f5e5e5a3b49efc28d604fec62975156" +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + dependencies: + find-up "^2.1.0" pluralize@^7.0.0: version "7.0.0" @@ -2566,25 +3841,32 @@ pn@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" -prettier@^1.12.1: - version "1.12.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.1.tgz#c1ad20e803e7749faf905a409d2367e06bbe7325" +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -pretty-ms@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-2.1.0.tgz#4257c256df3fb0b451d6affaab021884126981dc" +prettier@^1.12.1: + version "1.13.5" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.5.tgz#7ae2076998c8edce79d63834e9b7b09fead6bfd0" + +pretty-format@^23.0.1: + version "23.0.1" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.0.1.tgz#d61d065268e4c759083bccbca27a01ad7c7601f4" dependencies: - is-finite "^1.0.1" - parse-ms "^1.0.0" - plur "^1.0.0" + ansi-regex "^3.0.0" + ansi-styles "^3.2.0" prismjs@^1.14.0: - version "1.14.0" - resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.14.0.tgz#bbccfdb8be5d850d26453933cb50122ca0362ae0" + version "1.15.0" + resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.15.0.tgz#8801d332e472091ba8def94976c8877ad60398d9" optionalDependencies: clipboard "^2.0.0" @@ -2618,25 +3900,46 @@ pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" +psl@^1.1.24: + version "1.1.28" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.28.tgz#4fb6ceb08a1e2214d4fd4de0ca22dae13740bc7b" + punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" punycode@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" qs@~6.3.0: version "6.3.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c" -qs@~6.5.1: - version "6.5.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" +qs@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" -re-emitter@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/re-emitter/-/re-emitter-1.1.3.tgz#fa9e319ffdeeeb35b27296ef0f3d374dac2f52a7" +qs@~6.5.1: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + +randomatic@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.0.0.tgz#d35490030eb4f7578de292ce6dfb04a91a128923" + dependencies: + is-number "^4.0.0" + kind-of "^6.0.0" + math-random "^1.0.1" + +rc@^1.1.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" read-pkg-up@^1.0.1: version "1.0.1" @@ -2668,7 +3971,7 @@ read-pkg@^2.0.0: normalize-package-data "^2.3.2" path-type "^2.0.0" -readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2: +readable-stream@^2.0.1, readable-stream@^2.0.6, readable-stream@^2.2.2: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" dependencies: @@ -2680,6 +3983,12 @@ readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.6, readable string_decoder "~1.1.1" util-deprecate "~1.0.1" +realpath-native@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.0.0.tgz#7885721a83b43bd5327609f0ddecb2482305fdf0" + dependencies: + util.promisify "^1.0.0" + redent@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" @@ -2688,8 +3997,8 @@ redent@^1.0.0: strip-indent "^1.0.1" regenerate@^1.2.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f" + version "1.4.0" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" regenerator-runtime@^0.11.0: version "0.11.1" @@ -2703,6 +4012,19 @@ regenerator-transform@^0.10.0: babel-types "^6.19.0" private "^0.1.6" +regex-cache@^0.4.2: + version "0.4.4" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" + dependencies: + is-equal-shallow "^0.1.3" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + regexpu-core@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" @@ -2725,7 +4047,15 @@ relateurl@0.2.x: version "0.2.7" resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" -repeat-string@^1.5.2: +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2, repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" @@ -2749,9 +4079,36 @@ request-promise-native@^1.0.5: stealthy-require "^1.1.0" tough-cookie ">=2.3.3" -request@2, request@^2.83.0: - version "2.85.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.85.0.tgz#5a03615a47c61420b3eb99b7dba204f83603e1fa" +"request@>=2.9.0 <2.82.0": + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~4.2.1" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "^0.6.0" + uuid "^3.0.0" + +request@^2.83.0: + version "2.87.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.87.0.tgz#32f00235cd08d482b4d0d68db93a829c0ed5756e" dependencies: aws-sign2 "~0.7.0" aws4 "^1.6.0" @@ -2761,7 +4118,6 @@ request@2, request@^2.83.0: forever-agent "~0.6.1" form-data "~2.3.1" har-validator "~5.0.3" - hawk "~6.0.2" http-signature "~1.2.0" is-typedarray "~1.0.0" isstream "~0.1.2" @@ -2771,7 +4127,6 @@ request@2, request@^2.83.0: performance-now "^2.1.0" qs "~6.5.1" safe-buffer "^5.1.1" - stringstream "~0.0.5" tough-cookie "~2.3.3" tunnel-agent "^0.6.0" uuid "^3.1.0" @@ -2816,19 +4171,31 @@ require-uncached@^1.0.3: caller-path "^0.1.0" resolve-from "^1.0.0" +resolve-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" + dependencies: + resolve-from "^3.0.0" + resolve-from@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" -resolve@^1.3.3, resolve@^1.5.0: - version "1.7.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3" - dependencies: - path-parse "^1.0.5" +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" -resolve@~1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + +resolve@1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + +resolve@^1.3.3, resolve@^1.5.0: + version "1.8.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" dependencies: path-parse "^1.0.5" @@ -2839,13 +4206,17 @@ restore-cursor@^2.0.0: onetime "^2.0.0" signal-exit "^3.0.2" -resumer@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" - dependencies: - through "~2.3.4" +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" -rimraf@2, rimraf@^2.2.8: +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@2, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" dependencies: @@ -2882,6 +4253,10 @@ rollup@^0.58.2: "@types/estree" "0.0.38" "@types/node" "*" +rsvp@^3.3.3: + version "3.6.2" + resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a" + run-async@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" @@ -2902,14 +4277,35 @@ rx-lite@*, rx-lite@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" -safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" -safer-buffer@^2.1.0: +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" +sane@^2.0.0: + version "2.5.2" + resolved "https://registry.yarnpkg.com/sane/-/sane-2.5.2.tgz#b4dc1861c21b427e929507a3e751e2a2cb8ab3fa" + dependencies: + anymatch "^2.0.0" + capture-exit "^1.2.0" + exec-sh "^0.2.0" + fb-watchman "^2.0.0" + micromatch "^3.1.4" + minimist "^1.1.1" + walker "~1.0.5" + watch "~0.18.0" + optionalDependencies: + fsevents "^1.2.3" + sass-graph@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.4.tgz#13fbd63cd1caf0908b9fd93476ad43a51d1e0b49" @@ -2961,6 +4357,24 @@ set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" +set-value@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.1" + to-object-path "^0.3.0" + +set-value@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" @@ -2975,6 +4389,10 @@ shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" +shellwords@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" + signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -2989,17 +4407,48 @@ slice-ansi@1.0.0: dependencies: is-fullwidth-code-point "^2.0.0" +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + sntp@1.x.x: version "1.0.9" resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" dependencies: hoek "2.x.x" -sntp@2.x.x: - version "2.1.0" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8" +source-map-resolve@^0.5.0: + version "0.5.2" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" dependencies: - hoek "4.x.x" + atob "^2.1.1" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" source-map-support@^0.4.15: version "0.4.18" @@ -3007,17 +4456,28 @@ source-map-support@^0.4.15: dependencies: source-map "^0.5.6" -source-map@0.5.x, source-map@^0.5.6, source-map@^0.5.7: +source-map-support@^0.5.6: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13" + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + +source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" -source-map@^0.4.2: +source-map@^0.4.2, source-map@^0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" dependencies: amdefine ">=0.0.4" -source-map@~0.6.1: +source-map@^0.6.0, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" @@ -3043,30 +4503,35 @@ spdx-license-ids@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87" -split@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" dependencies: - through "2" + extend-shallow "^3.0.0" sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" sshpk@^1.7.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.1.tgz#130f5975eddad963f1d56f92b9ac6c51fa9f83eb" + version "1.14.2" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98" dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" dashdash "^1.12.0" getpass "^0.1.1" + safer-buffer "^2.0.2" optionalDependencies: bcrypt-pbkdf "^1.0.0" ecc-jsbn "~0.1.1" jsbn "~0.1.0" tweetnacl "~0.14.0" +stack-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.1.tgz#d4f33ab54e8e38778b0ca5cfd3b3afb12db68620" + standard-engine@~8.0.0: version "8.0.1" resolved "https://registry.yarnpkg.com/standard-engine/-/standard-engine-8.0.1.tgz#0b77be8d7ab963675717dbeac1ef1d6675fb62f0" @@ -3076,6 +4541,13 @@ standard-engine@~8.0.0: minimist "^1.1.0" pkg-conf "^2.0.0" +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + stdout-stream@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/stdout-stream/-/stdout-stream-1.4.0.tgz#a2c7c8587e54d9427ea9edb3ac3f2cd522df378b" @@ -3086,6 +4558,13 @@ stealthy-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" +string-length@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" + dependencies: + astral-regex "^1.0.0" + strip-ansi "^4.0.0" + string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -3094,19 +4573,27 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -string-width@^2.1.0, string-width@^2.1.1: +"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" dependencies: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string.prototype.trim@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz#d04de2c89e137f4d7d206f086b5ed2fae6be8cea" +string.prototype.padend@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz#f3aaef7c1719f170c5eab1c32bf780d96e21f2f0" dependencies: define-properties "^1.1.2" - es-abstract "^1.5.0" + es-abstract "^1.4.3" + function-bind "^1.0.2" + +string.prototype.padstart@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/string.prototype.padstart/-/string.prototype.padstart-3.0.0.tgz#5bcfad39f4649bb2d031292e19bcf0b510d4b242" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.4.3" function-bind "^1.0.2" string_decoder@~1.1.1: @@ -3115,9 +4602,15 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -stringstream@~0.0.4, stringstream@~0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" +stringstream@~0.0.4: + version "0.0.6" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.6.tgz#7880225b0d4ad10e30927d167a1d6f2fd3b33a72" + +strip-ansi@4.0.0, strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" @@ -3125,11 +4618,9 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - dependencies: - ansi-regex "^3.0.0" +strip-bom@3.0.0, strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" strip-bom@^2.0.0: version "2.0.0" @@ -3137,9 +4628,9 @@ strip-bom@^2.0.0: dependencies: is-utf8 "^0.2.0" -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" strip-indent@^1.0.1: version "1.0.1" @@ -3155,6 +4646,12 @@ supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" +supports-color@^3.1.2: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + dependencies: + has-flag "^1.0.0" + supports-color@^5.3.0: version "5.4.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" @@ -3176,46 +4673,6 @@ table@4.0.2: slice-ansi "1.0.0" string-width "^2.1.1" -tap-out@^1.4.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/tap-out/-/tap-out-1.4.2.tgz#c907ec1bf9405111d088263e92f5608b88cbb37a" - dependencies: - re-emitter "^1.0.0" - readable-stream "^2.0.0" - split "^1.0.0" - trim "0.0.1" - -tap-spec@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/tap-spec/-/tap-spec-4.1.1.tgz#e2e9f26f5208232b1f562288c97624d58a88f05a" - dependencies: - chalk "^1.0.0" - duplexer "^0.1.1" - figures "^1.4.0" - lodash "^3.6.0" - pretty-ms "^2.1.0" - repeat-string "^1.5.2" - tap-out "^1.4.1" - through2 "^2.0.0" - -tape@^4.9.0: - version "4.9.0" - resolved "https://registry.yarnpkg.com/tape/-/tape-4.9.0.tgz#855c08360395133709d34d3fbf9ef341eb73ca6a" - dependencies: - deep-equal "~1.0.1" - defined "~1.0.0" - for-each "~0.3.2" - function-bind "~1.1.1" - glob "~7.1.2" - has "~1.0.1" - inherits "~2.0.3" - minimist "~1.2.0" - object-inspect "~1.5.0" - resolve "~1.5.0" - resumer "~0.0.0" - string.prototype.trim "~1.1.2" - through "~2.3.8" - tar@^2.0.0: version "2.2.1" resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" @@ -3224,18 +4681,37 @@ tar@^2.0.0: fstream "^1.0.2" inherits "2" +tar@^4: + version "4.4.4" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.4.tgz#ec8409fae9f665a4355cc3b4087d0820232bb8cd" + dependencies: + chownr "^1.0.1" + fs-minipass "^1.2.5" + minipass "^2.3.3" + minizlib "^1.1.0" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.2" + +test-exclude@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.1.tgz#dfa222f03480bca69207ca728b37d74b45f724fa" + dependencies: + arrify "^1.0.1" + micromatch "^3.1.8" + object-assign "^4.1.0" + read-pkg-up "^1.0.1" + require-main-filename "^1.0.1" + text-table@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" -through2@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" - dependencies: - readable-stream "^2.1.5" - xtend "~4.0.1" +throat@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" -through@2, through@^2.3.6, through@~2.3.4, through@~2.3.8: +through@^2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" @@ -3249,11 +4725,44 @@ tmp@^0.0.33: dependencies: os-tmpdir "~1.0.2" +tmpl@1.0.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" + to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" -tough-cookie@>=2.3.3, tough-cookie@^2.3.3, tough-cookie@~2.3.0, tough-cookie@~2.3.3: +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +tough-cookie@>=2.3.3, tough-cookie@^2.3.3: + version "2.4.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.2.tgz#aa9133154518b494efab98a58247bfc38818c00c" + dependencies: + psl "^1.1.24" + punycode "^1.4.1" + +tough-cookie@~2.3.0, tough-cookie@~2.3.3: version "2.3.4" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" dependencies: @@ -3273,10 +4782,6 @@ trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" -trim@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.1.tgz#5858547f6b290757ee95cccc666fb50084c460dd" - "true-case-path@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/true-case-path/-/true-case-path-1.0.2.tgz#7ec91130924766c7f573be3020c34f8fdfd00d62" @@ -3307,21 +4812,43 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -ua-parser-js@^0.7.9: - version "0.7.17" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac" +ua-parser-js@^0.7.18: + version "0.7.18" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.18.tgz#a7bfd92f56edfb117083b69e31d2aa8882d4b1ed" uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.5.tgz#0c65f15f815aa08b560a61ce8b4db7ffc3f45376" uglify-js@3.3.x: - version "3.3.23" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.3.23.tgz#48ea43e638364d18be292a6fdc2b5b7c35f239ab" + version "3.3.28" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.3.28.tgz#0efb9a13850e11303361c1051f64d2ec68d9be06" dependencies: commander "~2.15.0" source-map "~0.6.1" +uglify-js@^2.6: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +union-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^0.4.3" + uniq@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" @@ -3330,14 +4857,42 @@ universalify@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + upper-case@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + +use@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.0.tgz#14716bf03fdfefd03040aef58d8b4b85f3a7c544" + dependencies: + kind-of "^6.0.2" + +utf8-bar@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/utf8-bar/-/utf8-bar-0.1.0.tgz#789195506e88c6762309920b1627a77e64e1f7c1" + util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" +util.promisify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" + dependencies: + define-properties "^1.1.2" + object.getownpropertydescriptors "^2.0.3" + uuid@^3.0.0, uuid@^3.1.0: version "3.2.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" @@ -3367,6 +4922,19 @@ w3c-hr-time@^1.0.1: dependencies: browser-process-hrtime "^0.1.2" +walker@~1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + dependencies: + makeerror "1.0.x" + +watch@~0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986" + dependencies: + exec-sh "^0.2.0" + minimist "^1.2.0" + webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" @@ -3385,9 +4953,9 @@ whatwg-mimetype@^2.0.0, whatwg-mimetype@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.1.0.tgz#f0f21d76cbba72362eb609dbed2a30cd17fcc7d4" -whatwg-url@^6.4.0: - version "6.4.1" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.4.1.tgz#fdb94b440fd4ad836202c16e9737d511f012fd67" +whatwg-url@^6.4.0, whatwg-url@^6.4.1: + version "6.5.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8" dependencies: lodash.sortby "^4.7.0" tr46 "^1.0.1" @@ -3397,17 +4965,33 @@ which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" -which@1, which@^1.2.9: - version "1.3.0" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + +which@1, which@^1.2.12, which@^1.2.9, which@^1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" dependencies: isexe "^2.0.0" wide-align@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" dependencies: - string-width "^1.0.2" + string-width "^1.0.2 || 2" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" wordwrap@~1.0.0: version "1.0.0" @@ -3424,6 +5008,14 @@ wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" +write-file-atomic@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + write@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" @@ -3441,7 +5033,7 @@ xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" -xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: +xtend@^4.0.0, xtend@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" @@ -3453,12 +5045,39 @@ yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" +yallist@^3.0.0, yallist@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" + yargs-parser@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" dependencies: camelcase "^3.0.0" +yargs-parser@^9.0.2: + version "9.0.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" + dependencies: + camelcase "^4.1.0" + +yargs@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.0.0.tgz#c052931006c5eee74610e5fc0354bedfd08a201b" + dependencies: + cliui "^4.0.0" + decamelize "^1.1.1" + find-up "^2.1.0" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^9.0.2" + yargs@^7.0.0: version "7.1.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" @@ -3476,3 +5095,12 @@ yargs@^7.0.0: which-module "^1.0.0" y18n "^3.2.1" yargs-parser "^5.0.0" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0"