diff --git a/package-lock.json b/package-lock.json index 1f859f49d..710f23ce3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,26 @@ "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" + } + }, "abab": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz", @@ -31,12 +51,29 @@ "acorn": "5.5.3" } }, + "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 +86,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 +159,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 +189,18 @@ "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", "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 + }, "asn1": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", @@ -98,6 +213,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 +260,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 +340,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", @@ -317,6 +521,26 @@ "babel-types": "6.26.0" } }, + "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 +559,35 @@ "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-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 +600,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", @@ -666,6 +925,31 @@ "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-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 +1031,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 +1130,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 +1192,50 @@ "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" + } + }, + "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 +1268,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 +1325,35 @@ } } }, + "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 + }, + "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", @@ -942,6 +1420,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,6 +1460,18 @@ "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", @@ -984,6 +1484,18 @@ "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "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,12 +1582,27 @@ "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" + } + }, "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, + "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-equal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", @@ -1088,6 +1615,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,6 +1634,53 @@ "object-keys": "1.0.11" } }, + "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 + } + } + }, "defined": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", @@ -1123,6 +1706,27 @@ "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "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 + }, "domexception": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz", @@ -1236,6 +1840,12 @@ } } }, + "esprima": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "dev": true + }, "estraverse": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", @@ -1254,12 +1864,258 @@ "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" + } + } + } + }, + "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,6 +2140,15 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "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": { + "bser": "2.0.0" + } + }, "figures": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", @@ -1294,6 +2159,45 @@ "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-up": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", @@ -1313,6 +2217,21 @@ "is-function": "1.0.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": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", @@ -1336,12 +2255,550 @@ "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.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", @@ -1428,6 +2885,18 @@ "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", "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,6 +2920,25 @@ "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", @@ -1484,6 +2972,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 +3127,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 +3183,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 +3240,22 @@ "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", "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", @@ -1661,12 +3302,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 +3338,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 +3417,33 @@ "number-is-nan": "1.0.1" } }, + "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-function": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.1.tgz", "integrity": "sha1-Es+5i2W1fdPRk6MSH19uL0N2ArU=", "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 +3463,53 @@ "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-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-property": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", @@ -1737,6 +3525,12 @@ "has": "1.0.1" } }, + "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 +3549,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 +3567,682 @@ "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 + }, "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-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 +4255,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 +4306,12 @@ "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-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -1844,6 +4330,12 @@ "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 + }, "jsonpointer": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", @@ -1862,6 +4354,22 @@ "verror": "1.10.0" } }, + "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 +4385,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 +4410,24 @@ "uc.micro": "1.0.5" } }, + "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", @@ -1926,6 +4458,12 @@ "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 +4499,36 @@ "yallist": "2.1.2" } }, + "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 +4542,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 +4581,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 +4678,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 +4705,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 +4743,52 @@ } } }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "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", @@ -2101,6 +4827,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 +5051,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,6 +5105,28 @@ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "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-inspect": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.5.0.tgz", @@ -2355,6 +5139,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 +5195,30 @@ "wrappy": "1.0.2" } }, + "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 +5264,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 +5303,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", @@ -2448,6 +5336,12 @@ "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 +5357,12 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "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,6 +5407,26 @@ "pinkie": "2.0.4" } }, + "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" + } + } + } + }, "plur": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/plur/-/plur-1.0.0.tgz", @@ -2519,18 +5439,57 @@ "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-format": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-23.0.1.tgz", + "integrity": "sha1-1h0GUmjkx1kIO8y8onoBrXx2AfQ=", + "dev": true, + "requires": { + "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" + } + } + } + }, "pretty-ms": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-2.1.0.tgz", @@ -2581,6 +5540,31 @@ "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", "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 + } + } + }, "re-emitter": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/re-emitter/-/re-emitter-1.1.3.tgz", @@ -2647,6 +5631,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 +5673,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 +5732,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", @@ -2806,6 +5830,27 @@ "path-parse": "1.0.5" } }, + "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": { + "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 + }, "resumer": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", @@ -2815,6 +5860,22 @@ "through": "2.3.8" } }, + "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": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", @@ -2843,12 +5904,73 @@ "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 + }, "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", @@ -2907,12 +6029,173 @@ "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" + } + } + } + }, + "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 + }, + "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 +6211,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", @@ -2969,6 +6280,15 @@ "through": "2.3.8" } }, + "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": { + "extend-shallow": "3.0.2" + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -2991,6 +6311,33 @@ "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 + }, + "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,6 +6353,60 @@ "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", "dev": true }, + "string-length": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz", + "integrity": "sha1-1A27aGo6zpYMHP/KVivyxF+DY+0=", + "dev": true, + "requires": { + "astral-regex": "1.0.0", + "strip-ansi": "4.0.0" + }, + "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.trim": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz", @@ -3041,6 +6442,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", @@ -3151,6 +6564,54 @@ "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" + } + } + } + }, + "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", @@ -3174,12 +6635,49 @@ "dev": true, "optional": true }, + "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", @@ -3218,6 +6716,12 @@ "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", @@ -3291,18 +6795,133 @@ } } }, + "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" + } + } + } + }, + "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 + } + } + }, "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", @@ -3339,6 +6958,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", @@ -3417,6 +7055,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 +7106,17 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, + "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..b2a1e4c0f 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "chalk": "^2.4.1", "fs-extra": "^6.0.0", "html-minifier": "^3.5.15", + "jest": "^23.1.0", "jsdom": "^11.10.0", "markdown-it": "^8.4.1", "mini.css": "^2.3.7", @@ -32,7 +33,8 @@ "extractor": "node ./scripts/extract.js", "packager": "node ./scripts/module.js", "localizer": "node ./scripts/localize.js", - "test": "tape test/**/*.test.js | tap-spec" + "test": "tape test/**/*.test.js | tap-spec", + "test2": "jest ./jesttest/**/*.test.js" }, "repository": { "type": "git", diff --git a/test/JSONToDate/JSONToDate.test.js b/test/JSONToDate/JSONToDate.test.js deleted file mode 100644 index 1e2a7a57b..000000000 --- a/test/JSONToDate/JSONToDate.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/JSONToFile/JSONToFile.test.js b/test/JSONToFile/JSONToFile.test.js deleted file mode 100644 index 7c352d079..000000000 --- a/test/JSONToFile/JSONToFile.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/RGBToHex/RGBToHex.test.js b/test/RGBToHex/RGBToHex.test.js deleted file mode 100644 index 277d6575c..000000000 --- a/test/RGBToHex/RGBToHex.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/URLJoin/URLJoin.test.js b/test/URLJoin/URLJoin.test.js deleted file mode 100644 index 70d0d09a6..000000000 --- a/test/URLJoin/URLJoin.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/UUIDGeneratorBrowser/UUIDGeneratorBrowser.test.js b/test/UUIDGeneratorBrowser/UUIDGeneratorBrowser.test.js deleted file mode 100644 index 255054290..000000000 --- a/test/UUIDGeneratorBrowser/UUIDGeneratorBrowser.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/UUIDGeneratorNode/UUIDGeneratorNode.test.js b/test/UUIDGeneratorNode/UUIDGeneratorNode.test.js deleted file mode 100644 index 1857e1727..000000000 --- a/test/UUIDGeneratorNode/UUIDGeneratorNode.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/all/all.test.js b/test/all/all.test.js index 60ac82f4a..b3b238577 100644 --- a/test/all/all.test.js +++ b/test/all/all.test.js @@ -1,21 +1,16 @@ -const test = require('tape'); +const expect = require('expect'); const all = require('./all.js'); -test('Testing all', (t) => { +test('Testing all', () => { //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(); + expect(typeof all === 'function').toBeTruthy(); + expect(all([4,1,2,3])).toBeTruthy(); + expect(all([0,1])).toBeFalsy(); + expect(all([NaN,1])).toBeFalsy(); + expect(all([undefined,1])).toBeFalsy(); + expect(all([null,1])).toBeFalsy(); + expect(all(['',1])).toBeFalsy(); + expect(all([4,1,2,3], x => x >= 1)).toBeTruthy(); + expect(all([0,1], x => x >= 1)).toBeFalsy(); }); diff --git a/test/any/any.test.js b/test/any/any.test.js index 63399b385..a5ae70981 100644 --- a/test/any/any.test.js +++ b/test/any/any.test.js @@ -1,18 +1,13 @@ -const test = require('tape'); +const expect = require('expect'); const any = require('./any.js'); -test('Testing any', (t) => { +test('Testing any', () => { //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(); + expect(typeof any === 'function').toBeTruthy(); + expect(any([0,1,2,3])).toBeTruthy(); + expect(any([0,0])).toBeFalsy(); + expect(any([NaN,0,undefined,null,''])).toBeFalsy(); + expect(any([4,1,0,3], x => x >= 1)).toBeTruthy(); + expect(any([0,1], x => x < 0)).toBeFalsy(); }); diff --git a/test/approximatelyEqual/approximatelyEqual.test.js b/test/approximatelyEqual/approximatelyEqual.test.js index 44221aeb8..5e223172e 100644 --- a/test/approximatelyEqual/approximatelyEqual.test.js +++ b/test/approximatelyEqual/approximatelyEqual.test.js @@ -1,17 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const approximatelyEqual = require('./approximatelyEqual.js'); -test('Testing approximatelyEqual', (t) => { +test('Testing approximatelyEqual', () => { //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(); + expect(typeof approximatelyEqual === 'function').toBeTruthy(); + expect(approximatelyEqual(Math.PI / 2.0 , 1.5708)).toBeTruthy(); + expect(approximatelyEqual(0.1 + 0.2, 0.3)).toBeTruthy(); + expect(approximatelyEqual(0.5, 0.5)).toBeTruthy(); + 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..005e1a472 100644 --- a/test/arrayToHtmlList/arrayToHtmlList.test.js +++ b/test/arrayToHtmlList/arrayToHtmlList.test.js @@ -1,14 +1,8 @@ -const test = require('tape'); +const expect = require('expect'); const arrayToHtmlList = require('./arrayToHtmlList.js'); -test('Testing arrayToHtmlList', (t) => { +test('Testing arrayToHtmlList', () => { //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(); + expect(typeof arrayToHtmlList === 'function').toBeTruthy(); }); diff --git a/test/ary/ary.test.js b/test/ary/ary.test.js index f73c1c40f..66ca2da84 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) => { +test('Testing ary', () => { //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'); + expect(typeof ary === 'function').toBeTruthy(); 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(); + 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..1ea997aed 100644 --- a/test/atob/atob.test.js +++ b/test/atob/atob.test.js @@ -1,15 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const atob = require('./atob.js'); -test('Testing atob', (t) => { +test('Testing atob', () => { //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(); + expect(typeof atob === 'function').toBeTruthy(); + expect(atob('Zm9vYmFy')).toBe('foobar'); + expect(atob('Z')).toBe(''); }); diff --git a/test/attempt/attempt.test.js b/test/attempt/attempt.test.js index 557d7af3b..0e6b0d5b0 100644 --- a/test/attempt/attempt.test.js +++ b/test/attempt/attempt.test.js @@ -1,15 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const attempt = require('./attempt.js'); -test('Testing attempt', (t) => { +test('Testing attempt', () => { //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(); + expect(typeof attempt === 'function').toBeTruthy(); + expect(attempt(() => 0)).toBe(0); + expect(attempt(() => {throw new Error();}) instanceof Error).toBeTruthy(); }); diff --git a/test/average/average.test.js b/test/average/average.test.js index 16a9471c7..b07cc6380 100644 --- a/test/average/average.test.js +++ b/test/average/average.test.js @@ -1,24 +1,23 @@ -const test = require('tape'); +const expect = require('expect'); const average = require('./average.js'); -test('Testing average', (t) => { +test('Testing average', () => { //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'); + expect(typeof average === 'function').toBeTruthy(); + expect(average(true) === 1).toBeTruthy(); + expect(average(false) === 0).toBeTruthy(); + expect(average(9, 1)).toBe(5); + expect(average(153, 44, 55, 64, 71, 1122, 322774, 2232, 23423, 234, 3631)).toBe(32163.909090909092); + expect(average(1, 2, 3)).toBe(2); + expect(average(null)).toBe(0); + expect(isNaN(average(undefined))).toBeTruthy(); + expect(isNaN(average('String'))).toBeTruthy(); + expect(isNaN(average({ a: 123}))).toBeTruthy(); + 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(); + let end = new Date().getTime(); + expect((end - start) < 2000).toBeTruthy(); }); \ No newline at end of file diff --git a/test/averageBy/averageBy.test.js b/test/averageBy/averageBy.test.js index 7c3fabe16..d1a1839c3 100644 --- a/test/averageBy/averageBy.test.js +++ b/test/averageBy/averageBy.test.js @@ -1,15 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const averageBy = require('./averageBy.js'); -test('Testing averageBy', (t) => { +test('Testing averageBy', () => { //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(); + expect(typeof averageBy === 'function').toBeTruthy(); + expect(averageBy([{ n: 4 }, { n: 2 }, { n: 8 }, { n: 6 }], o => o.n)).toBe(5); + 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..b8bbda4bf 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) => { +test('Testing bifurcate', () => { //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(); + expect(typeof bifurcate === 'function').toBeTruthy(); + 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..2eebcb6e6 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) => { +test('Testing bifurcateBy', () => { //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(); + expect(typeof bifurcateBy === 'function').toBeTruthy(); + 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..34620e797 100644 --- a/test/binarySearch/binarySearch.test.js +++ b/test/binarySearch/binarySearch.test.js @@ -1,16 +1,13 @@ -const test = require('tape'); +const expect = require('expect'); const binarySearch = require('./binarySearch.js'); -test('Testing binarySearch', (t) => { +test('Testing binarySearch', () => { //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'); + expect(typeof binarySearch === 'function').toBeTruthy(); //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(); + expect(binarySearch([1, 4, 6, 7, 12, 13, 15, 18, 19, 20, 22, 24], 6)).toBe(2); + expect(binarySearch([1, 4, 6, 7, 12, 13, 15, 18, 19, 20, 22, 24], 21)).toBe(-1); + expect(binarySearch([], 21)).toBe(-1); + expect(binarySearch([1], 1)).toBe(0); }); \ No newline at end of file diff --git a/test/bind/bind.test.js b/test/bind/bind.test.js index e3ba1054c..552c40249 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) => { +test('Testing bind', () => { //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'); + expect(typeof bind === 'function').toBeTruthy(); 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(); + expect(freddyBound('hi', '!')).toBe('hi fred!'); }); diff --git a/test/bindAll/bindAll.test.js b/test/bindAll/bindAll.test.js index 3876982f4..2d6a07c8d 100644 --- a/test/bindAll/bindAll.test.js +++ b/test/bindAll/bindAll.test.js @@ -1,10 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const bindAll = require('./bindAll.js'); -test('Testing bindAll', (t) => { +test('Testing bindAll', () => { //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'); + expect(typeof bindAll === 'function').toBeTruthy(); var view = { label: 'docs', 'click': function() { @@ -12,10 +12,5 @@ test('Testing bindAll', (t) => { } }; 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(); + expect(view.click()).toBe('clicked docs'); }); diff --git a/test/bindKey/bindKey.test.js b/test/bindKey/bindKey.test.js index 2aed1fb1e..b34d80dd3 100644 --- a/test/bindKey/bindKey.test.js +++ b/test/bindKey/bindKey.test.js @@ -1,10 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const bindKey = require('./bindKey.js'); -test('Testing bindKey', (t) => { +test('Testing bindKey', () => { //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'); + expect(typeof bindKey === 'function').toBeTruthy(); const freddy = { user: 'fred', greet: function(greeting, punctuation) { @@ -12,10 +12,5 @@ test('Testing bindKey', (t) => { } }; 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(); + expect(freddyBound('hi', '!')).toBe('hi fred!'); }); diff --git a/test/binomialCoefficient/binomialCoefficient.test.js b/test/binomialCoefficient/binomialCoefficient.test.js index 2f0e8ab20..2549bb0e8 100644 --- a/test/binomialCoefficient/binomialCoefficient.test.js +++ b/test/binomialCoefficient/binomialCoefficient.test.js @@ -1,18 +1,13 @@ -const test = require('tape'); +const expect = require('expect'); const binomialCoefficient = require('./binomialCoefficient.js'); -test('Testing binomialCoefficient', (t) => { +test('Testing binomialCoefficient', () => { //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(); + expect(typeof binomialCoefficient === 'function').toBeTruthy(); + expect(binomialCoefficient(8, 2)).toBe(28); + expect(binomialCoefficient(0, 0)).toBe(1); + expect(binomialCoefficient(5, 3)).toBe(10); + expect(Number.isNaN(binomialCoefficient(NaN, 3))).toBeTruthy(); + expect(Number.isNaN(binomialCoefficient(5, NaN))).toBeTruthy(); }); diff --git a/test/bottomVisible/bottomVisible.test.js b/test/bottomVisible/bottomVisible.test.js index b9be1fc89..ba92fa3de 100644 --- a/test/bottomVisible/bottomVisible.test.js +++ b/test/bottomVisible/bottomVisible.test.js @@ -1,14 +1,8 @@ -const test = require('tape'); +const expect = require('expect'); const bottomVisible = require('./bottomVisible.js'); -test('Testing bottomVisible', (t) => { +test('Testing bottomVisible', () => { //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(); + expect(typeof bottomVisible === 'function').toBeTruthy(); }); diff --git a/test/btoa/btoa.test.js b/test/btoa/btoa.test.js index 85690e99b..6720da7bc 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) => { +test('Testing btoa', () => { //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(); + expect(typeof btoa === 'function').toBeTruthy(); + expect(btoa('foobar')).toBe('Zm9vYmFy'); }); diff --git a/test/byteSize/byteSize.test.js b/test/byteSize/byteSize.test.js index 423c63ce4..f0cafd212 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. +import expect from 'expect'; const Blob = class{ constructor(s) { return { @@ -10,21 +9,11 @@ const Blob = class{ // const byteSize = require('./byteSize.js'); // Override const byteSize = str => new Blob([str]).size; -test('Testing byteSize', (t) => { +test('Testing byteSize', () => { //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(); + expect(typeof byteSize === 'function').toBeTruthy(); + expect(byteSize('a')).toBe(1); + expect(byteSize('Hello World')).toBe(11); + expect(byteSize('😀')).toBe(4); }); diff --git a/test/call/call.test.js b/test/call/call.test.js index bf1ed5e56..831054502 100644 --- a/test/call/call.test.js +++ b/test/call/call.test.js @@ -1,13 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const call = require('./call.js'); -test('Testing call', (t) => { +test('Testing call', () => { //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'); + expect(typeof call === 'function').toBeTruthy(); //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 diff --git a/test/capitalize/capitalize.test.js b/test/capitalize/capitalize.test.js index 9a19686af..677d1198b 100644 --- a/test/capitalize/capitalize.test.js +++ b/test/capitalize/capitalize.test.js @@ -1,17 +1,12 @@ -const test = require('tape'); +const expect = require('expect'); const capitalize = require('./capitalize.js'); -test('Testing capitalize', (t) => { +test('Testing capitalize', () => { //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(); + expect(typeof capitalize === 'function').toBeTruthy(); + expect(capitalize('fooBar')).toBe('FooBar'); + expect(capitalize('fooBar', true)).toBe('Foobar'); + expect(capitalize('#!#', true)).toBe('#!#'); + expect(capitalize('a', true)).toBe('A'); }); \ No newline at end of file diff --git a/test/capitalizeEveryWord/capitalizeEveryWord.test.js b/test/capitalizeEveryWord/capitalizeEveryWord.test.js index 5ea7eb4d7..2f3482a35 100644 --- a/test/capitalizeEveryWord/capitalizeEveryWord.test.js +++ b/test/capitalizeEveryWord/capitalizeEveryWord.test.js @@ -1,16 +1,11 @@ -const test = require('tape'); +const expect = require('expect'); const capitalizeEveryWord = require('./capitalizeEveryWord.js'); -test('Testing capitalizeEveryWord', (t) => { +test('Testing capitalizeEveryWord', () => { //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(); + expect(typeof capitalizeEveryWord === 'function').toBeTruthy(); + expect(capitalizeEveryWord('hello world!')).toBe('Hello World!'); + expect(capitalizeEveryWord('$# @!')).toBe('$# @!'); + expect(capitalizeEveryWord('a')).toBe('A'); }); \ No newline at end of file diff --git a/test/castArray/castArray.test.js b/test/castArray/castArray.test.js index a0961a491..b66526e2f 100644 --- a/test/castArray/castArray.test.js +++ b/test/castArray/castArray.test.js @@ -1,18 +1,13 @@ -const test = require('tape'); +const expect = require('expect'); const castArray = require('./castArray.js'); -test('Testing castArray', (t) => { +test('Testing castArray', () => { //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(); + expect(typeof castArray === 'function').toBeTruthy(); + expect(castArray(1)).toEqual([1]); + expect(castArray([1])).toEqual([1]); + expect(castArray([1,2,3])).toEqual([1,2,3]); + expect(castArray('test')).toEqual(['test']); + expect(castArray({})).toEqual([{}]); }); diff --git a/test/chainAsync/chainAsync.test.js b/test/chainAsync/chainAsync.test.js index a1e6edd06..1fa7bf1eb 100644 --- a/test/chainAsync/chainAsync.test.js +++ b/test/chainAsync/chainAsync.test.js @@ -1,10 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const chainAsync = require('./chainAsync.js'); -test('Testing chainAsync', (t) => { +test('Testing chainAsync', () => { //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'); + expect(typeof chainAsync === 'function').toBeTruthy(); chainAsync([ next => { next(); @@ -14,14 +14,6 @@ test('Testing chainAsync', (t) => { next(); })(); }, - next => { - t.pass("Calls all functions in an array"); - } + next => {} ]); - // // 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..18b6bf623 100644 --- a/test/chunk/chunk.test.js +++ b/test/chunk/chunk.test.js @@ -1,22 +1,21 @@ -const test = require('tape'); +const expect = require('expect'); const chunk = require('./chunk.js'); -test('Testing chunk', (t) => { +test('Testing chunk', () => { //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'); + expect(typeof chunk === 'function').toBeTruthy(); + expect(chunk([1, 2, 3, 4, 5], 2)).toEqual([[1,2],[3,4],[5]]); + expect(chunk([])).toEqual([]); + expect(chunk(123)).toEqual([]); + expect(chunk({ a: 123})).toEqual([]); + expect(chunk('string', 2)).toEqual([ 'st', 'ri', 'ng' ]); + expect(() => chunk()).toThrow(); + expect(() => chunk(undefined)).toThrow(); + expect(() => chunk(null)).toThrow(); 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(); + expect((end - start) < 2000).toBeTruthy(); }); diff --git a/test/clampNumber/clampNumber.test.js b/test/clampNumber/clampNumber.test.js index 0e62c5b8f..2ee01ebc7 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) => { +test('Testing clampNumber', () => { //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(); + expect(typeof clampNumber === 'function').toBeTruthy(); + expect(clampNumber(2, 3, 5)).toBe(3); }); \ No newline at end of file diff --git a/test/cleanObj/cleanObj.test.js b/test/cleanObj/cleanObj.test.js index db490ed45..15ea30712 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) => { +test('Testing cleanObj', () => { //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'); + expect(typeof cleanObj === 'function').toBeTruthy(); 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(); + expect(cleanObj(testObj, ['a'], 'children')).toEqual({ a: 1, children : { a: 1}}); }); \ No newline at end of file diff --git a/test/cloneRegExp/cloneRegExp.test.js b/test/cloneRegExp/cloneRegExp.test.js index 17b2ce8c0..3a323061b 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) => { +test('Testing cloneRegExp', () => { //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'); + expect(typeof cloneRegExp === 'function').toBeTruthy(); 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(); + expect(cloneRegExp(rgTest)).not.toBe(rgTest); }); diff --git a/test/coalesce/coalesce.test.js b/test/coalesce/coalesce.test.js index e32afaf95..fb0876734 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) => { +test('Testing coalesce', () => { //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(); + expect(typeof coalesce === 'function').toBeTruthy(); + expect(coalesce(null, undefined, '', NaN, 'Waldo')).toEqual(''); }); \ No newline at end of file diff --git a/test/coalesceFactory/coalesceFactory.test.js b/test/coalesceFactory/coalesceFactory.test.js index e0651ace2..74cd3b817 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) => { +test('Testing coalesceFactory', () => { //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'); + expect(typeof coalesceFactory === 'function').toBeTruthy(); 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(); + expect(customCoalesce(undefined, null, NaN, '', 'Waldo')).toEqual('Waldo'); }); \ No newline at end of file diff --git a/test/collatz/collatz.test.js b/test/collatz/collatz.test.js index 5b177db8d..3163ac75c 100644 --- a/test/collatz/collatz.test.js +++ b/test/collatz/collatz.test.js @@ -1,24 +1,19 @@ -const test = require('tape'); +const expect = require('expect'); const collatz = require('./collatz.js'); -test('Testing collatz', (t) => { +test('Testing collatz', () => { //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'); + expect(typeof collatz === 'function').toBeTruthy(); //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'); + expect(collatz(8)).toBe(4); + expect(collatz(9)).toBe(28); let n = 9; while(true){ if (n === 1){ - t.pass('Eventually reaches 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..ecfc30293 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) => { +test('Testing collectInto', () => { //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'); + expect(typeof collectInto === 'function').toBeTruthy(); 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(); + Pall(p1, p2, p3).then(function(val){ expect(val).toEqual([1,2,3]);}, function(reason){}); }); diff --git a/test/colorize/colorize.test.js b/test/colorize/colorize.test.js index 77666f0ae..85def3607 100644 --- a/test/colorize/colorize.test.js +++ b/test/colorize/colorize.test.js @@ -1,14 +1,8 @@ -const test = require('tape'); +const expect = require('expect'); const colorize = require('./colorize.js'); -test('Testing colorize', (t) => { +test('Testing colorize', () => { //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(); + expect(typeof colorize === 'function').toBeTruthy(); }); diff --git a/test/compact/compact.test.js b/test/compact/compact.test.js index 74de02b1b..f3a4af122 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) => { +test('Testing compact', () => { //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(); + expect(typeof compact === 'function').toBeTruthy(); + expect(compact([0, 1, false, 2, '', 3, 'a', 'e' * 23, NaN, 's', 34])).toEqual([ 1, 2, 3, 'a', 's', 34 ]); }); \ No newline at end of file diff --git a/test/compose/compose.test.js b/test/compose/compose.test.js index 87c2ea8bd..b8788829b 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) => { +test('Testing compose', () => { //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'); + expect(typeof compose === 'function').toBeTruthy(); 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(); + expect(multiplyAndAdd5(5, 2)).toBe(15); }); \ No newline at end of file diff --git a/test/composeRight/composeRight.test.js b/test/composeRight/composeRight.test.js index c07f7e8a5..bf6ff5ed9 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) => { +test('Testing composeRight', () => { //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'); + expect(typeof composeRight === 'function').toBeTruthy(); 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(); + expect(addAndSquare(1, 2)).toBe(9); }); diff --git a/test/converge/converge.test.js b/test/converge/converge.test.js index 73cafbf11..d066c0937 100644 --- a/test/converge/converge.test.js +++ b/test/converge/converge.test.js @@ -1,23 +1,18 @@ -const test = require('tape'); +const expect = require('expect'); const converge = require('./converge.js'); -test('Testing converge', (t) => { +test('Testing converge', () => { //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'); + expect(typeof converge === 'function').toBeTruthy(); 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'); + expect(average([1, 2, 3, 4, 5, 6, 7])).toBe(4); 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(); + expect(strangeConcat('Yodel')).toBe("YODELyodel"); }); diff --git a/test/copyToClipboard/copyToClipboard.test.js b/test/copyToClipboard/copyToClipboard.test.js index 24118be8f..3dbcdf2db 100644 --- a/test/copyToClipboard/copyToClipboard.test.js +++ b/test/copyToClipboard/copyToClipboard.test.js @@ -1,14 +1,8 @@ -const test = require('tape'); +const expect = require('expect'); const copyToClipboard = require('./copyToClipboard.js'); -test('Testing copyToClipboard', (t) => { +test('Testing copyToClipboard', () => { //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(); + expect(typeof copyToClipboard === 'function').toBeTruthy(); }); diff --git a/test/countBy/countBy.test.js b/test/countBy/countBy.test.js index 94296d017..87b969afa 100644 --- a/test/countBy/countBy.test.js +++ b/test/countBy/countBy.test.js @@ -1,15 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const countBy = require('./countBy.js'); -test('Testing countBy', (t) => { +test('Testing countBy', () => { //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(); + expect(typeof countBy === 'function').toBeTruthy(); + expect(countBy([6.1, 4.2, 6.3], Math.floor)).toEqual({4: 1, 6: 2}); + 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..518b29888 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) => { +test('Testing countOccurrences', () => { //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(); + expect(typeof countOccurrences === 'function').toBeTruthy(); + expect(countOccurrences([1, 1, 2, 1, 2, 3], 1)).toEqual(3); }); \ No newline at end of file diff --git a/test/countVowels/countVowels.test.js b/test/countVowels/countVowels.test.js index 98a67a2b1..f631109ec 100644 --- a/test/countVowels/countVowels.test.js +++ b/test/countVowels/countVowels.test.js @@ -1,13 +1,8 @@ -const test = require('tape'); +const expect = require('expect'); const countVowels = require('./countVowels.js'); -test('Testing countVowels', (t) => { +test('Testing countVowels', () => { //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(); + expect(typeof countVowels === 'function').toBeTruthy(); }); \ No newline at end of file diff --git a/test/counter/counter.test.js b/test/counter/counter.test.js index f22689a34..93c889ed4 100644 --- a/test/counter/counter.test.js +++ b/test/counter/counter.test.js @@ -1,13 +1,8 @@ -const test = require('tape'); +const expect = require('expect'); const counter = require('./counter.js'); -test('Testing counter', (t) => { +test('Testing counter', () => { //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(); + expect(typeof counter === 'function').toBeTruthy(); }); \ No newline at end of file diff --git a/test/createElement/createElement.test.js b/test/createElement/createElement.test.js index 6923ec245..f8dadcc16 100644 --- a/test/createElement/createElement.test.js +++ b/test/createElement/createElement.test.js @@ -1,14 +1,8 @@ -const test = require('tape'); +const expect = require('expect'); const createElement = require('./createElement.js'); -test('Testing createElement', (t) => { +test('Testing createElement', () => { //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(); + expect(typeof createElement === 'function').toBeTruthy(); }); diff --git a/test/createEventHub/createEventHub.test.js b/test/createEventHub/createEventHub.test.js index 101d07aef..4991ebaca 100644 --- a/test/createEventHub/createEventHub.test.js +++ b/test/createEventHub/createEventHub.test.js @@ -1,14 +1,8 @@ -const test = require('tape'); +const expect = require('expect'); const createEventHub = require('./createEventHub.js'); -test('Testing createEventHub', (t) => { +test('Testing createEventHub', () => { //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(); + expect(typeof createEventHub === 'function').toBeTruthy(); }); diff --git a/test/currentURL/currentURL.test.js b/test/currentURL/currentURL.test.js index e190ad429..52aeb37b3 100644 --- a/test/currentURL/currentURL.test.js +++ b/test/currentURL/currentURL.test.js @@ -1,14 +1,8 @@ -const test = require('tape'); +const expect = require('expect'); const currentURL = require('./currentURL.js'); -test('Testing currentURL', (t) => { +test('Testing currentURL', () => { //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(); + expect(typeof currentURL === 'function').toBeTruthy(); }); diff --git a/test/curry/curry.test.js b/test/curry/curry.test.js index 341b11811..b2f8cae8a 100644 --- a/test/curry/curry.test.js +++ b/test/curry/curry.test.js @@ -1,15 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const curry = require('./curry.js'); -test('Testing curry', (t) => { +test('Testing curry', () => { //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(); + expect(typeof curry === 'function').toBeTruthy(); + expect(curry(Math.pow)(2)(10)).toBe(1024); + expect(curry(Math.min, 3)(10)(50)(2)).toBe(2); }); \ No newline at end of file diff --git a/test/debounce/debounce.test.js b/test/debounce/debounce.test.js index 867aac93a..88d9c3b75 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) => { +test('Testing debounce', () => { //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(); + expect(typeof debounce === 'function').toBeTruthy(); + debounce(() => {}, 250); }); diff --git a/test/decapitalize/decapitalize.test.js b/test/decapitalize/decapitalize.test.js index 83bf6b32a..b600ace89 100644 --- a/test/decapitalize/decapitalize.test.js +++ b/test/decapitalize/decapitalize.test.js @@ -1,15 +1,10 @@ -const test = require('tape'); +const expect = require('expect'); const decapitalize = require('./decapitalize.js'); -test('Testing decapitalize', (t) => { +test('Testing decapitalize', () => { //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(); + expect(typeof decapitalize === 'function').toBeTruthy(); + expect(decapitalize('FooBar')).toBe('fooBar'); + expect(decapitalize('FooBar', true)).toBe('fOOBAR'); }); diff --git a/test/deepClone/deepClone.test.js b/test/deepClone/deepClone.test.js index c2276f6ae..dca7e3a64 100644 --- a/test/deepClone/deepClone.test.js +++ b/test/deepClone/deepClone.test.js @@ -1,21 +1,16 @@ -const test = require('tape'); +const expect = require('expect'); const deepClone = require('./deepClone.js'); -test('Testing deepClone', (t) => { +test('Testing deepClone', () => { //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'); + expect(typeof deepClone === 'function').toBeTruthy(); 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(); + expect(a).not.toBe(b); + expect(a.obj).not.toBe(b.obj); + expect(c).not.toBe(d); + expect(c[0]).not.toBe(d[0]); }); diff --git a/test/deepFlatten/deepFlatten.test.js b/test/deepFlatten/deepFlatten.test.js index d6225da28..2d57901e4 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) => { +test('Testing deepFlatten', () => { //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(); + expect(typeof deepFlatten === 'function').toBeTruthy(); + expect(deepFlatten([1, [2], [[3], 4], 5])).toEqual([1, 2, 3, 4, 5]); }); \ No newline at end of file diff --git a/test/defaults/defaults.test.js b/test/defaults/defaults.test.js deleted file mode 100644 index b3c519f9d..000000000 --- a/test/defaults/defaults.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/defer/defer.test.js b/test/defer/defer.test.js deleted file mode 100644 index 23e125b90..000000000 --- a/test/defer/defer.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/degreesToRads/degreesToRads.test.js b/test/degreesToRads/degreesToRads.test.js deleted file mode 100644 index 8ec980a10..000000000 --- a/test/degreesToRads/degreesToRads.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/delay/delay.test.js b/test/delay/delay.test.js deleted file mode 100644 index 8404b3bcb..000000000 --- a/test/delay/delay.test.js +++ /dev/null @@ -1,20 +0,0 @@ -const test = require('tape'); -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'); - delay( - function(text) { - t.equals(text, 'test', 'Works as expecting, passing arguments properly'); - }, - 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 deleted file mode 100644 index 9a369fe00..000000000 --- a/test/detectDeviceType/detectDeviceType.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/difference/difference.test.js b/test/difference/difference.test.js deleted file mode 100644 index 17a5b7ba2..000000000 --- a/test/difference/difference.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/differenceBy/differenceBy.test.js b/test/differenceBy/differenceBy.test.js deleted file mode 100644 index 36c220cac..000000000 --- a/test/differenceBy/differenceBy.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/differenceWith/differenceWith.test.js b/test/differenceWith/differenceWith.test.js deleted file mode 100644 index b3dd65cd5..000000000 --- a/test/differenceWith/differenceWith.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/digitize/digitize.test.js b/test/digitize/digitize.test.js deleted file mode 100644 index 2fb81a471..000000000 --- a/test/digitize/digitize.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/distance/distance.test.js b/test/distance/distance.test.js deleted file mode 100644 index 7939c3048..000000000 --- a/test/distance/distance.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/drop/drop.test.js b/test/drop/drop.test.js deleted file mode 100644 index 3b20fd1cd..000000000 --- a/test/drop/drop.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/dropRight/dropRight.test.js b/test/dropRight/dropRight.test.js deleted file mode 100644 index b224b0a47..000000000 --- a/test/dropRight/dropRight.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/dropRightWhile/dropRightWhile.test.js b/test/dropRightWhile/dropRightWhile.test.js deleted file mode 100644 index 50bba45c3..000000000 --- a/test/dropRightWhile/dropRightWhile.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/dropWhile/dropWhile.test.js b/test/dropWhile/dropWhile.test.js deleted file mode 100644 index 0bbc55024..000000000 --- a/test/dropWhile/dropWhile.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/elementIsVisibleInViewport/elementIsVisibleInViewport.test.js b/test/elementIsVisibleInViewport/elementIsVisibleInViewport.test.js deleted file mode 100644 index a2b4b7a59..000000000 --- a/test/elementIsVisibleInViewport/elementIsVisibleInViewport.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/elo/elo.test.js b/test/elo/elo.test.js deleted file mode 100644 index c7f757a8e..000000000 --- a/test/elo/elo.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/equals/equals.test.js b/test/equals/equals.test.js deleted file mode 100644 index fd7f0e8f4..000000000 --- a/test/equals/equals.test.js +++ /dev/null @@ -1,18 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/escapeHTML/escapeHTML.test.js b/test/escapeHTML/escapeHTML.test.js deleted file mode 100644 index 642cbfd5b..000000000 --- a/test/escapeHTML/escapeHTML.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/escapeRegExp/escapeRegExp.test.js b/test/escapeRegExp/escapeRegExp.test.js deleted file mode 100644 index 9ecb9497a..000000000 --- a/test/escapeRegExp/escapeRegExp.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/everyNth/everyNth.test.js b/test/everyNth/everyNth.test.js deleted file mode 100644 index 53c3851ef..000000000 --- a/test/everyNth/everyNth.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/extendHex/extendHex.test.js b/test/extendHex/extendHex.test.js deleted file mode 100644 index c9fd57973..000000000 --- a/test/extendHex/extendHex.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/factorial/factorial.test.js b/test/factorial/factorial.test.js deleted file mode 100644 index d8694b446..000000000 --- a/test/factorial/factorial.test.js +++ /dev/null @@ -1,18 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/factors/factors.test.js b/test/factors/factors.test.js deleted file mode 100644 index cd9d3a0c9..000000000 --- a/test/factors/factors.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/fibonacci/fibonacci.test.js b/test/fibonacci/fibonacci.test.js deleted file mode 100644 index 75951a4de..000000000 --- a/test/fibonacci/fibonacci.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/fibonacciCountUntilNum/fibonacciCountUntilNum.test.js b/test/fibonacciCountUntilNum/fibonacciCountUntilNum.test.js deleted file mode 100644 index 6d14331d3..000000000 --- a/test/fibonacciCountUntilNum/fibonacciCountUntilNum.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/fibonacciUntilNum/fibonacciUntilNum.test.js b/test/fibonacciUntilNum/fibonacciUntilNum.test.js deleted file mode 100644 index a023c376c..000000000 --- a/test/fibonacciUntilNum/fibonacciUntilNum.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/filterNonUnique/filterNonUnique.test.js b/test/filterNonUnique/filterNonUnique.test.js deleted file mode 100644 index 9fd18bf41..000000000 --- a/test/filterNonUnique/filterNonUnique.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/findKey/findKey.test.js b/test/findKey/findKey.test.js deleted file mode 100644 index 7c505e561..000000000 --- a/test/findKey/findKey.test.js +++ /dev/null @@ -1,21 +0,0 @@ -const test = require('tape'); -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( - { - 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(); -}); diff --git a/test/findLast/findLast.test.js b/test/findLast/findLast.test.js deleted file mode 100644 index a2d74405c..000000000 --- a/test/findLast/findLast.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/findLastIndex/findLastIndex.test.js b/test/findLastIndex/findLastIndex.test.js deleted file mode 100644 index 2105f977a..000000000 --- a/test/findLastIndex/findLastIndex.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/findLastKey/findLastKey.test.js b/test/findLastKey/findLastKey.test.js deleted file mode 100644 index 41bcf3624..000000000 --- a/test/findLastKey/findLastKey.test.js +++ /dev/null @@ -1,21 +0,0 @@ -const test = require('tape'); -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( - { - 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(); -}); diff --git a/test/flatten/flatten.test.js b/test/flatten/flatten.test.js deleted file mode 100644 index eb54b6c19..000000000 --- a/test/flatten/flatten.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/flattenObject/flattenObject.test.js b/test/flattenObject/flattenObject.test.js deleted file mode 100644 index 6fea9f795..000000000 --- a/test/flattenObject/flattenObject.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/flip/flip.test.js b/test/flip/flip.test.js deleted file mode 100644 index e5cbedefc..000000000 --- a/test/flip/flip.test.js +++ /dev/null @@ -1,18 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/forEachRight/forEachRight.test.js b/test/forEachRight/forEachRight.test.js deleted file mode 100644 index 2b6b8a956..000000000 --- a/test/forEachRight/forEachRight.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/forOwn/forOwn.test.js b/test/forOwn/forOwn.test.js deleted file mode 100644 index b6910eb1f..000000000 --- a/test/forOwn/forOwn.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/forOwnRight/forOwnRight.test.js b/test/forOwnRight/forOwnRight.test.js deleted file mode 100644 index 66c783785..000000000 --- a/test/forOwnRight/forOwnRight.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/formatDuration/formatDuration.test.js b/test/formatDuration/formatDuration.test.js deleted file mode 100644 index 6c5cc23c3..000000000 --- a/test/formatDuration/formatDuration.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/fromCamelCase/fromCamelCase.test.js b/test/fromCamelCase/fromCamelCase.test.js deleted file mode 100644 index 58ecffed9..000000000 --- a/test/fromCamelCase/fromCamelCase.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/functionName/functionName.test.js b/test/functionName/functionName.test.js deleted file mode 100644 index 4231f45c5..000000000 --- a/test/functionName/functionName.test.js +++ /dev/null @@ -1,26 +0,0 @@ -const test = require('tape'); -//const functionName = require('./functionName.js'); -// Custom override for console.debug to check output. -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(); -}); diff --git a/test/functions/functions.test.js b/test/functions/functions.test.js deleted file mode 100644 index 0177fa60a..000000000 --- a/test/functions/functions.test.js +++ /dev/null @@ -1,20 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/gcd/gcd.test.js b/test/gcd/gcd.test.js deleted file mode 100644 index a222fe04b..000000000 --- a/test/gcd/gcd.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/geometricProgression/geometricProgression.test.js b/test/geometricProgression/geometricProgression.test.js deleted file mode 100644 index 059e83682..000000000 --- a/test/geometricProgression/geometricProgression.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/get/get.test.js b/test/get/get.test.js deleted file mode 100644 index d8448a171..000000000 --- a/test/get/get.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/getColonTimeFromDate/getColonTimeFromDate.test.js b/test/getColonTimeFromDate/getColonTimeFromDate.test.js deleted file mode 100644 index d1f0f3789..000000000 --- a/test/getColonTimeFromDate/getColonTimeFromDate.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/getDaysDiffBetweenDates/getDaysDiffBetweenDates.test.js b/test/getDaysDiffBetweenDates/getDaysDiffBetweenDates.test.js deleted file mode 100644 index 56bf82f8c..000000000 --- a/test/getDaysDiffBetweenDates/getDaysDiffBetweenDates.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/getMeridiemSuffixOfInteger/getMeridiemSuffixOfInteger.test.js b/test/getMeridiemSuffixOfInteger/getMeridiemSuffixOfInteger.test.js deleted file mode 100644 index 7df3d24df..000000000 --- a/test/getMeridiemSuffixOfInteger/getMeridiemSuffixOfInteger.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/getScrollPosition/getScrollPosition.test.js b/test/getScrollPosition/getScrollPosition.test.js deleted file mode 100644 index 9f7fd14d7..000000000 --- a/test/getScrollPosition/getScrollPosition.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/getStyle/getStyle.test.js b/test/getStyle/getStyle.test.js deleted file mode 100644 index 23bac0147..000000000 --- a/test/getStyle/getStyle.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/getType/getType.test.js b/test/getType/getType.test.js deleted file mode 100644 index 359e9ea07..000000000 --- a/test/getType/getType.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/getURLParameters/getURLParameters.test.js b/test/getURLParameters/getURLParameters.test.js deleted file mode 100644 index a030f86ee..000000000 --- a/test/getURLParameters/getURLParameters.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/groupBy/groupBy.test.js b/test/groupBy/groupBy.test.js deleted file mode 100644 index e3e8528bb..000000000 --- a/test/groupBy/groupBy.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/hammingDistance/hammingDistance.test.js b/test/hammingDistance/hammingDistance.test.js deleted file mode 100644 index 6ada1733c..000000000 --- a/test/hammingDistance/hammingDistance.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/hasClass/hasClass.test.js b/test/hasClass/hasClass.test.js deleted file mode 100644 index 43932ea01..000000000 --- a/test/hasClass/hasClass.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/hasFlags/hasFlags.test.js b/test/hasFlags/hasFlags.test.js deleted file mode 100644 index be0d4c301..000000000 --- a/test/hasFlags/hasFlags.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/hashBrowser/hashBrowser.test.js b/test/hashBrowser/hashBrowser.test.js deleted file mode 100644 index 5464dd95d..000000000 --- a/test/hashBrowser/hashBrowser.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/hashNode/hashNode.test.js b/test/hashNode/hashNode.test.js deleted file mode 100644 index 51345a607..000000000 --- a/test/hashNode/hashNode.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/head/head.test.js b/test/head/head.test.js deleted file mode 100644 index b6fa2d188..000000000 --- a/test/head/head.test.js +++ /dev/null @@ -1,21 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/hexToRGB/hexToRGB.test.js b/test/hexToRGB/hexToRGB.test.js deleted file mode 100644 index 4b3d0fdd8..000000000 --- a/test/hexToRGB/hexToRGB.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/hide/hide.test.js b/test/hide/hide.test.js deleted file mode 100644 index af1971858..000000000 --- a/test/hide/hide.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/howManyTimes/howManyTimes.test.js b/test/howManyTimes/howManyTimes.test.js deleted file mode 100644 index 250b542ce..000000000 --- a/test/howManyTimes/howManyTimes.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/httpDelete/httpDelete.test.js b/test/httpDelete/httpDelete.test.js deleted file mode 100644 index d4edd42a9..000000000 --- a/test/httpDelete/httpDelete.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/httpPut/httpPut.test.js b/test/httpPut/httpPut.test.js deleted file mode 100644 index d7c3f1e86..000000000 --- a/test/httpPut/httpPut.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/httpsRedirect/httpsRedirect.test.js b/test/httpsRedirect/httpsRedirect.test.js deleted file mode 100644 index f86baf715..000000000 --- a/test/httpsRedirect/httpsRedirect.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/hz/hz.test.js b/test/hz/hz.test.js deleted file mode 100644 index afd054442..000000000 --- a/test/hz/hz.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/inRange/inRange.test.js b/test/inRange/inRange.test.js deleted file mode 100644 index 10b2a2bec..000000000 --- a/test/inRange/inRange.test.js +++ /dev/null @@ -1,17 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/indexOfAll/indexOfAll.test.js b/test/indexOfAll/indexOfAll.test.js deleted file mode 100644 index d9c681a65..000000000 --- a/test/indexOfAll/indexOfAll.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/initial/initial.test.js b/test/initial/initial.test.js deleted file mode 100644 index d4b0b76d6..000000000 --- a/test/initial/initial.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/initialize2DArray/initialize2DArray.test.js b/test/initialize2DArray/initialize2DArray.test.js deleted file mode 100644 index d2436a46a..000000000 --- a/test/initialize2DArray/initialize2DArray.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/initializeArrayWithRange/initializeArrayWithRange.test.js b/test/initializeArrayWithRange/initializeArrayWithRange.test.js deleted file mode 100644 index c35b1f557..000000000 --- a/test/initializeArrayWithRange/initializeArrayWithRange.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/initializeArrayWithRangeRight/initializeArrayWithRangeRight.test.js b/test/initializeArrayWithRangeRight/initializeArrayWithRangeRight.test.js deleted file mode 100644 index f630da0c4..000000000 --- a/test/initializeArrayWithRangeRight/initializeArrayWithRangeRight.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/initializeArrayWithValues/initializeArrayWithValues.test.js b/test/initializeArrayWithValues/initializeArrayWithValues.test.js deleted file mode 100644 index e4590fcaa..000000000 --- a/test/initializeArrayWithValues/initializeArrayWithValues.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/initializeNDArray/initializeNDArray.test.js b/test/initializeNDArray/initializeNDArray.test.js deleted file mode 100644 index 82b015be3..000000000 --- a/test/initializeNDArray/initializeNDArray.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/intersection/intersection.test.js b/test/intersection/intersection.test.js deleted file mode 100644 index 065d86356..000000000 --- a/test/intersection/intersection.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/intersectionBy/intersectionBy.test.js b/test/intersectionBy/intersectionBy.test.js deleted file mode 100644 index 499153b91..000000000 --- a/test/intersectionBy/intersectionBy.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/intersectionWith/intersectionWith.test.js b/test/intersectionWith/intersectionWith.test.js deleted file mode 100644 index 1fac234c2..000000000 --- a/test/intersectionWith/intersectionWith.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/invertKeyValues/invertKeyValues.test.js b/test/invertKeyValues/invertKeyValues.test.js deleted file mode 100644 index 948a80889..000000000 --- a/test/invertKeyValues/invertKeyValues.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/is/is.test.js b/test/is/is.test.js deleted file mode 100644 index 9671e766d..000000000 --- a/test/is/is.test.js +++ /dev/null @@ -1,29 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/isAbsoluteURL/isAbsoluteURL.test.js b/test/isAbsoluteURL/isAbsoluteURL.test.js deleted file mode 100644 index 965d48cdc..000000000 --- a/test/isAbsoluteURL/isAbsoluteURL.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isAnagram/isAnagram.test.js b/test/isAnagram/isAnagram.test.js deleted file mode 100644 index 915d14aba..000000000 --- a/test/isAnagram/isAnagram.test.js +++ /dev/null @@ -1,17 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/isArmstrongNumber/isArmstrongNumber.test.js b/test/isArmstrongNumber/isArmstrongNumber.test.js deleted file mode 100644 index dbebfbfd0..000000000 --- a/test/isArmstrongNumber/isArmstrongNumber.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isArray/isArray.test.js b/test/isArray/isArray.test.js deleted file mode 100644 index 7d56d1112..000000000 --- a/test/isArray/isArray.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isArrayBuffer/isArrayBuffer.test.js b/test/isArrayBuffer/isArrayBuffer.test.js deleted file mode 100644 index 1d9cffa97..000000000 --- a/test/isArrayBuffer/isArrayBuffer.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isArrayLike/isArrayLike.test.js b/test/isArrayLike/isArrayLike.test.js deleted file mode 100644 index 97b41b827..000000000 --- a/test/isArrayLike/isArrayLike.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/isBoolean/isBoolean.test.js b/test/isBoolean/isBoolean.test.js deleted file mode 100644 index 68334e925..000000000 --- a/test/isBoolean/isBoolean.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isBrowser/isBrowser.test.js b/test/isBrowser/isBrowser.test.js deleted file mode 100644 index 3f0c1adf9..000000000 --- a/test/isBrowser/isBrowser.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isBrowserTabFocused/isBrowserTabFocused.test.js b/test/isBrowserTabFocused/isBrowserTabFocused.test.js deleted file mode 100644 index d3a5b5133..000000000 --- a/test/isBrowserTabFocused/isBrowserTabFocused.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isDivisible/isDivisible.test.js b/test/isDivisible/isDivisible.test.js deleted file mode 100644 index bdfa8a5c2..000000000 --- a/test/isDivisible/isDivisible.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isEmpty/isEmpty.test.js b/test/isEmpty/isEmpty.test.js deleted file mode 100644 index 76fc0aef8..000000000 --- a/test/isEmpty/isEmpty.test.js +++ /dev/null @@ -1,23 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/isEven/isEven.test.js b/test/isEven/isEven.test.js deleted file mode 100644 index 8c9e29455..000000000 --- a/test/isEven/isEven.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isFunction/isFunction.test.js b/test/isFunction/isFunction.test.js deleted file mode 100644 index 7311b25d4..000000000 --- a/test/isFunction/isFunction.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isLowerCase/isLowerCase.test.js b/test/isLowerCase/isLowerCase.test.js deleted file mode 100644 index 0e596dff9..000000000 --- a/test/isLowerCase/isLowerCase.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isMap/isMap.test.js b/test/isMap/isMap.test.js deleted file mode 100644 index bc9fe3187..000000000 --- a/test/isMap/isMap.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isNil/isNil.test.js b/test/isNil/isNil.test.js deleted file mode 100644 index c5e11d1f4..000000000 --- a/test/isNil/isNil.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/isNull/isNull.test.js b/test/isNull/isNull.test.js deleted file mode 100644 index dbc7d20c8..000000000 --- a/test/isNull/isNull.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isNumber/isNumber.test.js b/test/isNumber/isNumber.test.js deleted file mode 100644 index 90af5bb5b..000000000 --- a/test/isNumber/isNumber.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isObject/isObject.test.js b/test/isObject/isObject.test.js deleted file mode 100644 index 8ed7620c8..000000000 --- a/test/isObject/isObject.test.js +++ /dev/null @@ -1,19 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/isObjectLike/isObjectLike.test.js b/test/isObjectLike/isObjectLike.test.js deleted file mode 100644 index fe414423b..000000000 --- a/test/isObjectLike/isObjectLike.test.js +++ /dev/null @@ -1,17 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/isPlainObject/isPlainObject.test.js b/test/isPlainObject/isPlainObject.test.js deleted file mode 100644 index 515b61b2d..000000000 --- a/test/isPlainObject/isPlainObject.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/isPrime/isPrime.test.js b/test/isPrime/isPrime.test.js deleted file mode 100644 index 8d7ce3b8b..000000000 --- a/test/isPrime/isPrime.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isPrimitive/isPrimitive.test.js b/test/isPrimitive/isPrimitive.test.js deleted file mode 100644 index 3e0a21076..000000000 --- a/test/isPrimitive/isPrimitive.test.js +++ /dev/null @@ -1,24 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isPromiseLike/isPromiseLike.test.js b/test/isPromiseLike/isPromiseLike.test.js deleted file mode 100644 index 5ce5d856b..000000000 --- a/test/isPromiseLike/isPromiseLike.test.js +++ /dev/null @@ -1,20 +0,0 @@ -const test = require('tape'); -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({ - 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(); -}); diff --git a/test/isRegExp/isRegExp.test.js b/test/isRegExp/isRegExp.test.js deleted file mode 100644 index 2580a138d..000000000 --- a/test/isRegExp/isRegExp.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isSet/isSet.test.js b/test/isSet/isSet.test.js deleted file mode 100644 index 81fae132b..000000000 --- a/test/isSet/isSet.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isSimilar/isSimilar.test.js b/test/isSimilar/isSimilar.test.js deleted file mode 100644 index bcc980a18..000000000 --- a/test/isSimilar/isSimilar.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isSorted/isSorted.test.js b/test/isSorted/isSorted.test.js deleted file mode 100644 index a55dfe962..000000000 --- a/test/isSorted/isSorted.test.js +++ /dev/null @@ -1,23 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/isString/isString.test.js b/test/isString/isString.test.js deleted file mode 100644 index f48d8cfe0..000000000 --- a/test/isString/isString.test.js +++ /dev/null @@ -1,19 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isSymbol/isSymbol.test.js b/test/isSymbol/isSymbol.test.js deleted file mode 100644 index 24a4defdf..000000000 --- a/test/isSymbol/isSymbol.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isTravisCI/isTravisCI.test.js b/test/isTravisCI/isTravisCI.test.js deleted file mode 100644 index c807bcd67..000000000 --- a/test/isTravisCI/isTravisCI.test.js +++ /dev/null @@ -1,17 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/isTypedArray/isTypedArray.test.js b/test/isTypedArray/isTypedArray.test.js deleted file mode 100644 index 75253822d..000000000 --- a/test/isTypedArray/isTypedArray.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isUndefined/isUndefined.test.js b/test/isUndefined/isUndefined.test.js deleted file mode 100644 index 43029fcf8..000000000 --- a/test/isUndefined/isUndefined.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/isUpperCase/isUpperCase.test.js b/test/isUpperCase/isUpperCase.test.js deleted file mode 100644 index a0b8e8a89..000000000 --- a/test/isUpperCase/isUpperCase.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isValidJSON/isValidJSON.test.js b/test/isValidJSON/isValidJSON.test.js deleted file mode 100644 index b0ad1dac5..000000000 --- a/test/isValidJSON/isValidJSON.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isWeakMap/isWeakMap.test.js b/test/isWeakMap/isWeakMap.test.js deleted file mode 100644 index 72bb4544a..000000000 --- a/test/isWeakMap/isWeakMap.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/isWeakSet/isWeakSet.test.js b/test/isWeakSet/isWeakSet.test.js deleted file mode 100644 index 3bb390cde..000000000 --- a/test/isWeakSet/isWeakSet.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/join/join.test.js b/test/join/join.test.js deleted file mode 100644 index 385ef56b8..000000000 --- a/test/join/join.test.js +++ /dev/null @@ -1,17 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/last/last.test.js b/test/last/last.test.js deleted file mode 100644 index fc0ba799c..000000000 --- a/test/last/last.test.js +++ /dev/null @@ -1,21 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/lcm/lcm.test.js b/test/lcm/lcm.test.js deleted file mode 100644 index cba81345c..000000000 --- a/test/lcm/lcm.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/levenshteinDistance/levenshteinDistance.test.js b/test/levenshteinDistance/levenshteinDistance.test.js deleted file mode 100644 index 3c3c74404..000000000 --- a/test/levenshteinDistance/levenshteinDistance.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/longestItem/longestItem.test.js b/test/longestItem/longestItem.test.js deleted file mode 100644 index ae4b53739..000000000 --- a/test/longestItem/longestItem.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/lowercaseKeys/lowercaseKeys.test.js b/test/lowercaseKeys/lowercaseKeys.test.js deleted file mode 100644 index 6b7937773..000000000 --- a/test/lowercaseKeys/lowercaseKeys.test.js +++ /dev/null @@ -1,17 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/luhnCheck/luhnCheck.test.js b/test/luhnCheck/luhnCheck.test.js deleted file mode 100644 index e044cbd85..000000000 --- a/test/luhnCheck/luhnCheck.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/mapKeys/mapKeys.test.js b/test/mapKeys/mapKeys.test.js deleted file mode 100644 index 1ce44e71f..000000000 --- a/test/mapKeys/mapKeys.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/mapObject/mapObject.test.js b/test/mapObject/mapObject.test.js deleted file mode 100644 index 294bdcd00..000000000 --- a/test/mapObject/mapObject.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/mapValues/mapValues.test.js b/test/mapValues/mapValues.test.js deleted file mode 100644 index 273ada753..000000000 --- a/test/mapValues/mapValues.test.js +++ /dev/null @@ -1,18 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/mask/mask.test.js b/test/mask/mask.test.js deleted file mode 100644 index dc57ed888..000000000 --- a/test/mask/mask.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/matches/matches.test.js b/test/matches/matches.test.js deleted file mode 100644 index e28065fa5..000000000 --- a/test/matches/matches.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/matchesWith/matchesWith.test.js b/test/matchesWith/matchesWith.test.js deleted file mode 100644 index 9ce717785..000000000 --- a/test/matchesWith/matchesWith.test.js +++ /dev/null @@ -1,19 +0,0 @@ -const test = require('tape'); -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( - { 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(); -}); diff --git a/test/maxBy/maxBy.test.js b/test/maxBy/maxBy.test.js deleted file mode 100644 index 3c0d156b3..000000000 --- a/test/maxBy/maxBy.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/maxN/maxN.test.js b/test/maxN/maxN.test.js deleted file mode 100644 index 89e14ab98..000000000 --- a/test/maxN/maxN.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/median/median.test.js b/test/median/median.test.js deleted file mode 100644 index 9fa44be9c..000000000 --- a/test/median/median.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/memoize/memoize.test.js b/test/memoize/memoize.test.js deleted file mode 100644 index e90eb2b05..000000000 --- a/test/memoize/memoize.test.js +++ /dev/null @@ -1,18 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/merge/merge.test.js b/test/merge/merge.test.js deleted file mode 100644 index 2ed73d89a..000000000 --- a/test/merge/merge.test.js +++ /dev/null @@ -1,23 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/minBy/minBy.test.js b/test/minBy/minBy.test.js deleted file mode 100644 index f2a0ca5ff..000000000 --- a/test/minBy/minBy.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/minN/minN.test.js b/test/minN/minN.test.js deleted file mode 100644 index edfd36631..000000000 --- a/test/minN/minN.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/mostPerformant/mostPerformant.test.js b/test/mostPerformant/mostPerformant.test.js deleted file mode 100644 index 95a560f91..000000000 --- a/test/mostPerformant/mostPerformant.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/negate/negate.test.js b/test/negate/negate.test.js deleted file mode 100644 index a356b8a2d..000000000 --- a/test/negate/negate.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/nest/nest.test.js b/test/nest/nest.test.js deleted file mode 100644 index f3b177255..000000000 --- a/test/nest/nest.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/nodeListToArray/nodeListToArray.test.js b/test/nodeListToArray/nodeListToArray.test.js deleted file mode 100644 index 12d99435c..000000000 --- a/test/nodeListToArray/nodeListToArray.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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(); -}); \ No newline at end of file diff --git a/test/none/none.test.js b/test/none/none.test.js deleted file mode 100644 index af6209d91..000000000 --- a/test/none/none.test.js +++ /dev/null @@ -1,17 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/nthArg/nthArg.test.js b/test/nthArg/nthArg.test.js deleted file mode 100644 index b8cc4b62c..000000000 --- a/test/nthArg/nthArg.test.js +++ /dev/null @@ -1,18 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/nthElement/nthElement.test.js b/test/nthElement/nthElement.test.js deleted file mode 100644 index 6db6ddd4a..000000000 --- a/test/nthElement/nthElement.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/objectFromPairs/objectFromPairs.test.js b/test/objectFromPairs/objectFromPairs.test.js deleted file mode 100644 index af270b7cf..000000000 --- a/test/objectFromPairs/objectFromPairs.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/objectToPairs/objectToPairs.test.js b/test/objectToPairs/objectToPairs.test.js deleted file mode 100644 index e3477d39b..000000000 --- a/test/objectToPairs/objectToPairs.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/observeMutations/observeMutations.test.js b/test/observeMutations/observeMutations.test.js deleted file mode 100644 index fe42861a2..000000000 --- a/test/observeMutations/observeMutations.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/off/off.test.js b/test/off/off.test.js deleted file mode 100644 index 8a3eca663..000000000 --- a/test/off/off.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/offset/offset.test.js b/test/offset/offset.test.js deleted file mode 100644 index b122f8dbb..000000000 --- a/test/offset/offset.test.js +++ /dev/null @@ -1,19 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/omit/omit.test.js b/test/omit/omit.test.js deleted file mode 100644 index 296505687..000000000 --- a/test/omit/omit.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/omitBy/omitBy.test.js b/test/omitBy/omitBy.test.js deleted file mode 100644 index cf01f902b..000000000 --- a/test/omitBy/omitBy.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/on/on.test.js b/test/on/on.test.js deleted file mode 100644 index f14e85ad0..000000000 --- a/test/on/on.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/onUserInputChange/onUserInputChange.test.js b/test/onUserInputChange/onUserInputChange.test.js deleted file mode 100644 index bbc726d63..000000000 --- a/test/onUserInputChange/onUserInputChange.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/once/once.test.js b/test/once/once.test.js deleted file mode 100644 index 89aba3872..000000000 --- a/test/once/once.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/orderBy/orderBy.test.js b/test/orderBy/orderBy.test.js deleted file mode 100644 index 2a721f61e..000000000 --- a/test/orderBy/orderBy.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/over/over.test.js b/test/over/over.test.js deleted file mode 100644 index c349f6049..000000000 --- a/test/over/over.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/overArgs/overArgs.test.js b/test/overArgs/overArgs.test.js deleted file mode 100644 index 523cf3ff2..000000000 --- a/test/overArgs/overArgs.test.js +++ /dev/null @@ -1,17 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/pad/pad.test.js b/test/pad/pad.test.js deleted file mode 100644 index 035ebf91b..000000000 --- a/test/pad/pad.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/palindrome/palindrome.test.js b/test/palindrome/palindrome.test.js deleted file mode 100644 index 2c65f5995..000000000 --- a/test/palindrome/palindrome.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/parseCookie/parseCookie.test.js b/test/parseCookie/parseCookie.test.js deleted file mode 100644 index 2c6712d21..000000000 --- a/test/parseCookie/parseCookie.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/partial/partial.test.js b/test/partial/partial.test.js deleted file mode 100644 index 4c7b32d1d..000000000 --- a/test/partial/partial.test.js +++ /dev/null @@ -1,18 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/partialRight/partialRight.test.js b/test/partialRight/partialRight.test.js deleted file mode 100644 index 75b3113b5..000000000 --- a/test/partialRight/partialRight.test.js +++ /dev/null @@ -1,18 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/partition/partition.test.js b/test/partition/partition.test.js deleted file mode 100644 index 429fae050..000000000 --- a/test/partition/partition.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/percentile/percentile.test.js b/test/percentile/percentile.test.js deleted file mode 100644 index 63cf07868..000000000 --- a/test/percentile/percentile.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/permutations/permutations.test.js b/test/permutations/permutations.test.js deleted file mode 100644 index fe9b08e46..000000000 --- a/test/permutations/permutations.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/pick/pick.test.js b/test/pick/pick.test.js deleted file mode 100644 index 61565a0a2..000000000 --- a/test/pick/pick.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/pickBy/pickBy.test.js b/test/pickBy/pickBy.test.js deleted file mode 100644 index 523ed0bdd..000000000 --- a/test/pickBy/pickBy.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/pipeAsyncFunctions/pipeAsyncFunctions.test.js b/test/pipeAsyncFunctions/pipeAsyncFunctions.test.js deleted file mode 100644 index 7a4ae346e..000000000 --- a/test/pipeAsyncFunctions/pipeAsyncFunctions.test.js +++ /dev/null @@ -1,24 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/pipeFunctions/pipeFunctions.test.js b/test/pipeFunctions/pipeFunctions.test.js deleted file mode 100644 index a9703858f..000000000 --- a/test/pipeFunctions/pipeFunctions.test.js +++ /dev/null @@ -1,17 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/pluralize/pluralize.test.js b/test/pluralize/pluralize.test.js deleted file mode 100644 index 674244ca7..000000000 --- a/test/pluralize/pluralize.test.js +++ /dev/null @@ -1,23 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/powerset/powerset.test.js b/test/powerset/powerset.test.js deleted file mode 100644 index a9bf7ba6a..000000000 --- a/test/powerset/powerset.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/prefix/prefix.test.js b/test/prefix/prefix.test.js deleted file mode 100644 index 846d951c1..000000000 --- a/test/prefix/prefix.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/prettyBytes/prettyBytes.test.js b/test/prettyBytes/prettyBytes.test.js deleted file mode 100644 index 7553e5304..000000000 --- a/test/prettyBytes/prettyBytes.test.js +++ /dev/null @@ -1,17 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/primes/primes.test.js b/test/primes/primes.test.js deleted file mode 100644 index d64602713..000000000 --- a/test/primes/primes.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/promisify/promisify.test.js b/test/promisify/promisify.test.js deleted file mode 100644 index cd313631e..000000000 --- a/test/promisify/promisify.test.js +++ /dev/null @@ -1,17 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/pull/pull.test.js b/test/pull/pull.test.js deleted file mode 100644 index 81299a3f8..000000000 --- a/test/pull/pull.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/pullAtIndex/pullAtIndex.test.js b/test/pullAtIndex/pullAtIndex.test.js deleted file mode 100644 index 7ee05dc01..000000000 --- a/test/pullAtIndex/pullAtIndex.test.js +++ /dev/null @@ -1,17 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/pullAtValue/pullAtValue.test.js b/test/pullAtValue/pullAtValue.test.js deleted file mode 100644 index 00e22c122..000000000 --- a/test/pullAtValue/pullAtValue.test.js +++ /dev/null @@ -1,17 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/pullBy/pullBy.test.js b/test/pullBy/pullBy.test.js deleted file mode 100644 index 29082d3e0..000000000 --- a/test/pullBy/pullBy.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/quickSort/quickSort.test.js b/test/quickSort/quickSort.test.js deleted file mode 100644 index 86ef548a4..000000000 --- a/test/quickSort/quickSort.test.js +++ /dev/null @@ -1,22 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/radsToDegrees/radsToDegrees.test.js b/test/radsToDegrees/radsToDegrees.test.js deleted file mode 100644 index 446485d76..000000000 --- a/test/radsToDegrees/radsToDegrees.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/randomHexColorCode/randomHexColorCode.test.js b/test/randomHexColorCode/randomHexColorCode.test.js deleted file mode 100644 index 7d9946955..000000000 --- a/test/randomHexColorCode/randomHexColorCode.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/randomIntArrayInRange/randomIntArrayInRange.test.js b/test/randomIntArrayInRange/randomIntArrayInRange.test.js deleted file mode 100644 index 093fdba64..000000000 --- a/test/randomIntArrayInRange/randomIntArrayInRange.test.js +++ /dev/null @@ -1,19 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/randomIntegerInRange/randomIntegerInRange.test.js b/test/randomIntegerInRange/randomIntegerInRange.test.js deleted file mode 100644 index 41309c7e5..000000000 --- a/test/randomIntegerInRange/randomIntegerInRange.test.js +++ /dev/null @@ -1,18 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/randomNumberInRange/randomNumberInRange.test.js b/test/randomNumberInRange/randomNumberInRange.test.js deleted file mode 100644 index 15359481d..000000000 --- a/test/randomNumberInRange/randomNumberInRange.test.js +++ /dev/null @@ -1,18 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/readFileLines/readFileLines.test.js b/test/readFileLines/readFileLines.test.js deleted file mode 100644 index db0658908..000000000 --- a/test/readFileLines/readFileLines.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/rearg/rearg.test.js b/test/rearg/rearg.test.js deleted file mode 100644 index 781b5c5a0..000000000 --- a/test/rearg/rearg.test.js +++ /dev/null @@ -1,20 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/recordAnimationFrames/recordAnimationFrames.test.js b/test/recordAnimationFrames/recordAnimationFrames.test.js deleted file mode 100644 index 2d366d62a..000000000 --- a/test/recordAnimationFrames/recordAnimationFrames.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/redirect/redirect.test.js b/test/redirect/redirect.test.js deleted file mode 100644 index d6dbce35d..000000000 --- a/test/redirect/redirect.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/reduceSuccessive/reduceSuccessive.test.js b/test/reduceSuccessive/reduceSuccessive.test.js deleted file mode 100644 index 411438820..000000000 --- a/test/reduceSuccessive/reduceSuccessive.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/reduceWhich/reduceWhich.test.js b/test/reduceWhich/reduceWhich.test.js deleted file mode 100644 index 7e38f36d0..000000000 --- a/test/reduceWhich/reduceWhich.test.js +++ /dev/null @@ -1,19 +0,0 @@ -const test = require('tape'); -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( - [{ 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(); -}); diff --git a/test/reducedFilter/reducedFilter.test.js b/test/reducedFilter/reducedFilter.test.js deleted file mode 100644 index db6dcdc9e..000000000 --- a/test/reducedFilter/reducedFilter.test.js +++ /dev/null @@ -1,26 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/remove/remove.test.js b/test/remove/remove.test.js deleted file mode 100644 index 64c00696c..000000000 --- a/test/remove/remove.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/removeNonASCII/removeNonASCII.test.js b/test/removeNonASCII/removeNonASCII.test.js deleted file mode 100644 index 03aedfed1..000000000 --- a/test/removeNonASCII/removeNonASCII.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/removeVowels/removeVowels.test.js b/test/removeVowels/removeVowels.test.js deleted file mode 100644 index 67a187869..000000000 --- a/test/removeVowels/removeVowels.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/reverseString/reverseString.test.js b/test/reverseString/reverseString.test.js deleted file mode 100644 index 7aeca53df..000000000 --- a/test/reverseString/reverseString.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/round/round.test.js b/test/round/round.test.js deleted file mode 100644 index 2aa705899..000000000 --- a/test/round/round.test.js +++ /dev/null @@ -1,23 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/runAsync/runAsync.test.js b/test/runAsync/runAsync.test.js deleted file mode 100644 index cbe70590b..000000000 --- a/test/runAsync/runAsync.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/runPromisesInSeries/runPromisesInSeries.test.js b/test/runPromisesInSeries/runPromisesInSeries.test.js deleted file mode 100644 index 288878bf2..000000000 --- a/test/runPromisesInSeries/runPromisesInSeries.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/sample/sample.test.js b/test/sample/sample.test.js deleted file mode 100644 index 258d58e6f..000000000 --- a/test/sample/sample.test.js +++ /dev/null @@ -1,17 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/sampleSize/sampleSize.test.js b/test/sampleSize/sampleSize.test.js deleted file mode 100644 index 6c610fa2d..000000000 --- a/test/sampleSize/sampleSize.test.js +++ /dev/null @@ -1,19 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/scrollToTop/scrollToTop.test.js b/test/scrollToTop/scrollToTop.test.js deleted file mode 100644 index 1772b8fe9..000000000 --- a/test/scrollToTop/scrollToTop.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/sdbm/sdbm.test.js b/test/sdbm/sdbm.test.js deleted file mode 100644 index 8152041bb..000000000 --- a/test/sdbm/sdbm.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/serializeCookie/serializeCookie.test.js b/test/serializeCookie/serializeCookie.test.js deleted file mode 100644 index 45db4324f..000000000 --- a/test/serializeCookie/serializeCookie.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/setStyle/setStyle.test.js b/test/setStyle/setStyle.test.js deleted file mode 100644 index 3c8e4aa94..000000000 --- a/test/setStyle/setStyle.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/shallowClone/shallowClone.test.js b/test/shallowClone/shallowClone.test.js deleted file mode 100644 index 71223569b..000000000 --- a/test/shallowClone/shallowClone.test.js +++ /dev/null @@ -1,17 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/show/show.test.js b/test/show/show.test.js deleted file mode 100644 index 859735338..000000000 --- a/test/show/show.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/shuffle/shuffle.test.js b/test/shuffle/shuffle.test.js deleted file mode 100644 index aed55ad03..000000000 --- a/test/shuffle/shuffle.test.js +++ /dev/null @@ -1,18 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/similarity/similarity.test.js b/test/similarity/similarity.test.js deleted file mode 100644 index b82022707..000000000 --- a/test/similarity/similarity.test.js +++ /dev/null @@ -1,12 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/size/size.test.js b/test/size/size.test.js deleted file mode 100644 index 5c8410b23..000000000 --- a/test/size/size.test.js +++ /dev/null @@ -1,17 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/sleep/sleep.test.js b/test/sleep/sleep.test.js deleted file mode 100644 index 57beb16e2..000000000 --- a/test/sleep/sleep.test.js +++ /dev/null @@ -1,17 +0,0 @@ -const test = require('tape'); -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'); - async function sleepyWork() { - await sleep(1000); - t.pass('Works as expected'); - } - //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 deleted file mode 100644 index e74581e2c..000000000 --- a/test/smoothScroll/smoothScroll.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/solveRPN/solveRPN.test.js b/test/solveRPN/solveRPN.test.js deleted file mode 100644 index 78cea6cdf..000000000 --- a/test/solveRPN/solveRPN.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/sortCharactersInString/sortCharactersInString.test.js b/test/sortCharactersInString/sortCharactersInString.test.js deleted file mode 100644 index 25fc97bd8..000000000 --- a/test/sortCharactersInString/sortCharactersInString.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/sortedIndex/sortedIndex.test.js b/test/sortedIndex/sortedIndex.test.js deleted file mode 100644 index c60ba058f..000000000 --- a/test/sortedIndex/sortedIndex.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/sortedIndexBy/sortedIndexBy.test.js b/test/sortedIndexBy/sortedIndexBy.test.js deleted file mode 100644 index 6f173a5b6..000000000 --- a/test/sortedIndexBy/sortedIndexBy.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/sortedLastIndex/sortedLastIndex.test.js b/test/sortedLastIndex/sortedLastIndex.test.js deleted file mode 100644 index a80ef11dc..000000000 --- a/test/sortedLastIndex/sortedLastIndex.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/sortedLastIndexBy/sortedLastIndexBy.test.js b/test/sortedLastIndexBy/sortedLastIndexBy.test.js deleted file mode 100644 index e7f19f6e9..000000000 --- a/test/sortedLastIndexBy/sortedLastIndexBy.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/speechSynthesis/speechSynthesis.test.js b/test/speechSynthesis/speechSynthesis.test.js deleted file mode 100644 index 16d2f891f..000000000 --- a/test/speechSynthesis/speechSynthesis.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/splitLines/splitLines.test.js b/test/splitLines/splitLines.test.js deleted file mode 100644 index 7d03fd581..000000000 --- a/test/splitLines/splitLines.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/spreadOver/spreadOver.test.js b/test/spreadOver/spreadOver.test.js deleted file mode 100644 index d294b4f52..000000000 --- a/test/spreadOver/spreadOver.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/standardDeviation/standardDeviation.test.js b/test/standardDeviation/standardDeviation.test.js deleted file mode 100644 index ad43efb90..000000000 --- a/test/standardDeviation/standardDeviation.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/stringPermutations/stringPermutations.test.js b/test/stringPermutations/stringPermutations.test.js deleted file mode 100644 index 6b5bb11ad..000000000 --- a/test/stringPermutations/stringPermutations.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/stripHTMLTags/stripHTMLTags.test.js b/test/stripHTMLTags/stripHTMLTags.test.js deleted file mode 100644 index 7aad3d6fe..000000000 --- a/test/stripHTMLTags/stripHTMLTags.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/sum/sum.test.js b/test/sum/sum.test.js deleted file mode 100644 index 7abf88f6f..000000000 --- a/test/sum/sum.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/sumBy/sumBy.test.js b/test/sumBy/sumBy.test.js deleted file mode 100644 index 7d2660dec..000000000 --- a/test/sumBy/sumBy.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/sumPower/sumPower.test.js b/test/sumPower/sumPower.test.js deleted file mode 100644 index 44cb6d64f..000000000 --- a/test/sumPower/sumPower.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/symmetricDifference/symmetricDifference.test.js b/test/symmetricDifference/symmetricDifference.test.js deleted file mode 100644 index 1ceeba195..000000000 --- a/test/symmetricDifference/symmetricDifference.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/symmetricDifferenceBy/symmetricDifferenceBy.test.js b/test/symmetricDifferenceBy/symmetricDifferenceBy.test.js deleted file mode 100644 index 4b1fd4e3a..000000000 --- a/test/symmetricDifferenceBy/symmetricDifferenceBy.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/symmetricDifferenceWith/symmetricDifferenceWith.test.js b/test/symmetricDifferenceWith/symmetricDifferenceWith.test.js deleted file mode 100644 index 12267272d..000000000 --- a/test/symmetricDifferenceWith/symmetricDifferenceWith.test.js +++ /dev/null @@ -1,18 +0,0 @@ -const test = require('tape'); -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( - [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(); -}); diff --git a/test/tail/tail.test.js b/test/tail/tail.test.js deleted file mode 100644 index 6eb499139..000000000 --- a/test/tail/tail.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/take/take.test.js b/test/take/take.test.js deleted file mode 100644 index 030024725..000000000 --- a/test/take/take.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/takeRight/takeRight.test.js b/test/takeRight/takeRight.test.js deleted file mode 100644 index a7625862b..000000000 --- a/test/takeRight/takeRight.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/takeRightWhile/takeRightWhile.test.js b/test/takeRightWhile/takeRightWhile.test.js deleted file mode 100644 index c841d410d..000000000 --- a/test/takeRightWhile/takeRightWhile.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/takeWhile/takeWhile.test.js b/test/takeWhile/takeWhile.test.js deleted file mode 100644 index 09f5d5cb7..000000000 --- a/test/takeWhile/takeWhile.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/testlog b/test/testlog deleted file mode 100644 index 790dd2119..000000000 --- a/test/testlog +++ /dev/null @@ -1,2054 +0,0 @@ -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 - - - Testing JSONToDate - - ✔ JSONToDate is a Function - - Testing JSONToFile - - ✔ JSONToFile is a Function - ✔ Tested on 09/02/2018 by @chalarangelo - - Testing RGBToHex - - ✔ RGBToHex is a Function - ✔ Converts the values of RGB components to a color code. - - Testing URLJoin - - ✔ URLJoin is a Function - ✔ Returns proper URL - ✔ Returns proper URL - - Testing UUIDGeneratorBrowser - - ✔ UUIDGeneratorBrowser is a Function - ✔ Tested 09/02/2018 by @chalarangelo - - Testing UUIDGeneratorNode - - ✔ UUIDGeneratorNode is a Function - ✔ Contains dashes in the proper places - ✔ Only contains hexadecimal digits - - Testing all - - ✔ 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 - - Testing any - - ✔ 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 - - Testing approximatelyEqual - - ✔ 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 - - Testing arrayToHtmlList - - ✔ arrayToHtmlList is a Function - ✔ Tested by @chalarangelo on 16/02/2018 - - Testing ary - - ✔ ary is a Function - ✔ Discards arguments with index >=n - - Testing atob - - ✔ atob is a Function - ✔ atob("Zm9vYmFy") equals "foobar" - ✔ atob("Z") returns "" - - Testing attempt - - ✔ attempt is a Function - ✔ Returns a value - ✔ Returns an error - - Testing average - - ✔ 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 - - Testing averageBy - - ✔ averageBy is a Function - ✔ Produces the right result with a function - ✔ Produces the right result with a property name - - Testing bifurcate - - ✔ bifurcate is a Function - ✔ Splits the collection into two groups - - Testing bifurcateBy - - ✔ bifurcateBy is a Function - ✔ Splits the collection into two groups - - Testing binarySearch - - ✔ binarySearch is a Function - ✔ Finds item in array - ✔ Returns -1 when not found - ✔ Works with empty arrays - ✔ Works for one element arrays - - Testing bind - - ✔ bind is a Function - ✔ Binds to an object context - - Testing bindAll - - ✔ bindAll is a Function - ✔ Binds to an object context - - Testing bindKey - - ✔ bindKey is a Function - ✔ Binds function to an object context - - Testing binomialCoefficient - - ✔ binomialCoefficient is a Function - ✔ Returns the appropriate value - ✔ Returns the appropriate value - ✔ Returns the appropriate value - ✔ Returns NaN - ✔ Returns NaN - - Testing bottomVisible - - ✔ bottomVisible is a Function - ✔ Tested on 09/02/2018 by @chalarangelo - - Testing btoa - - ✔ btoa is a Function - ✔ btoa("foobar") equals "Zm9vYmFy" - - Testing byteSize - - ✔ byteSize is a Function - ✔ Works for a single letter - ✔ Works for a common string - ✔ Works for emoji - - Testing call - - ✔ call is a Function - ✔ Calls function on given object - - Testing capitalize - - ✔ 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 - - Testing capitalizeEveryWord - - ✔ capitalizeEveryWord is a Function - ✔ Capitalizes the first letter of every word in a string - ✔ Works with characters - ✔ Works with one word string - - Testing castArray - - ✔ 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 - - Testing chainAsync - - ✔ chainAsync is a Function - ✔ Calls all functions in an array - - Testing chunk - - ✔ 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 - - Testing clampNumber - - ✔ clampNumber is a Function - ✔ Clamps num within the inclusive range specified by the boundary values a and b - - Testing cleanObj - - ✔ cleanObj is a Function - ✔ Removes any properties except the ones specified from a JSON object - - Testing cloneRegExp - - ✔ cloneRegExp is a Function - ✔ Clones regular expressions properly - - Testing coalesce - - ✔ coalesce is a Function - ✔ Returns the first non-null/undefined argument - - Testing coalesceFactory - - ✔ coalesceFactory is a Function - ✔ Returns a customized coalesce function - - Testing collatz - - ✔ collatz is a Function - ✔ When n is even, divide by 2 - ✔ When n is odd, times by 3 and add 1 - ✔ Eventually reaches 1 - - Testing collectInto - - ✔ collectInto is a Function - - Testing colorize - - ✔ colorize is a Function - ✔ Tested on 09/02/2018 by @chalarangelo - - Testing compact - - ✔ compact is a Function - ✔ Removes falsey values from an array - - Testing compose - - ✔ compose is a Function - ✔ Performs right-to-left function composition - - Testing composeRight - - ✔ composeRight is a Function - ✔ Performs left-to-right function composition - - Testing converge - - ✔ converge is a Function - ✔ Produces the average of the array - ✔ Produces the strange concatenation - - Testing copyToClipboard - - ✔ copyToClipboard is a Function - ✔ Tested on 09/02/2018 by @chalarangelo - - Testing countBy - - ✔ countBy is a Function - ✔ Works for functions - ✔ Works for property names - - Testing countOccurrences - - ✔ countOccurrences is a Function - ✔ Counts the occurrences of a value in an array - - Testing countVowels - - ✔ countVowels is a Function - - Testing counter - - ✔ counter is a Function - - Testing createElement - - ✔ createElement is a Function - ✔ Tested by @chalarangelo on 16/02/2018 - - Testing createEventHub - - ✔ createEventHub is a Function - ✔ Tested by @chalarangelo on 16/02/2018 - - Testing currentURL - - ✔ currentURL is a Function - ✔ Tested by @chalarangelo on 16/02/2018 - - Testing curry - - ✔ curry is a Function - ✔ curries a Math.pow - ✔ curries a Math.min - - Testing debounce - - ✔ debounce is a Function - - Testing decapitalize - - ✔ decapitalize is a Function - ✔ Works with default parameter - ✔ Works with second parameter set to true - - Testing deepClone - - ✔ deepClone is a Function - ✔ Shallow cloning works - ✔ Deep cloning works - ✔ Array shallow cloning works - ✔ Array deep cloning works - - Testing deepFlatten - - ✔ deepFlatten is a Function - ✔ Deep flattens an array - - Testing defaults - - ✔ defaults is a Function - ✔ Assigns default values for undefined properties - - Testing defer - - ✔ defer is a Function - ✔ Tested by @chalarangelo on 16/02/2018 - - Testing degreesToRads - - ✔ degreesToRads is a Function - ✔ Returns the appropriate value - - Testing delay - - ✔ delay is a Function - - Testing detectDeviceType - - ✔ detectDeviceType is a Function - ✔ Tested on 09/02/2018 by @chalarangelo - - Testing difference - - ✔ difference is a Function - ✔ Returns the difference between two arrays - - Testing differenceBy - - ✔ differenceBy is a Function - ✔ Works using a native function and numbers - ✔ Works with arrow function and objects - - Testing differenceWith - - ✔ differenceWith is a Function - ✔ Filters out all values from an array - - Testing digitize - - ✔ digitize is a Function - ✔ Converts a number to an array of digits - - Testing distance - - ✔ distance is a Function - ✔ Calculates the distance between two points - - Testing drop - - ✔ drop is a Function - ✔ Works without the last argument - ✔ Removes appropriate element count as specified - ✔ Empties array given a count greater than length - - Testing dropRight - - ✔ 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 - - Testing dropRightWhile - - ✔ dropRightWhile is a Function - ✔ Removes elements from the end of an array until the passed function returns true. - - Testing dropWhile - - ✔ dropWhile is a Function - ✔ Removes elements in an array until the passed function returns true. - - Testing elementIsVisibleInViewport - - ✔ elementIsVisibleInViewport is a Function - ✔ Tested on 09/02/2018 by @chalarangelo - - Testing elo - - ✔ elo is a Function - ✔ Standard 1v1s - ✔ should be equivalent - ✔ 4 player FFA, all same rank - - Testing equals - - ✔ 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. - - Testing escapeHTML - - ✔ escapeHTML is a Function - ✔ Escapes a string for use in HTML - - Testing escapeRegExp - - ✔ escapeRegExp is a Function - ✔ Escapes a string to use in a regular expression - - Testing everyNth - - ✔ everyNth is a Function - ✔ Returns every nth element in an array - - Testing extendHex - - ✔ 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 - - Testing factorial - - ✔ 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 - - Testing factors - - ✔ factors is a Function - - Testing fibonacci - - ✔ fibonacci is a Function - ✔ Generates an array, containing the Fibonacci sequence - - Testing fibonacciCountUntilNum - - ✔ fibonacciCountUntilNum is a Function - - Testing fibonacciUntilNum - - ✔ fibonacciUntilNum is a Function - - Testing filterNonUnique - - ✔ filterNonUnique is a Function - ✔ Filters out the non-unique values in an array - - Testing findKey - - ✔ findKey is a Function - ✔ Returns the appropriate key - - Testing findLast - - ✔ findLast is a Function - ✔ Finds last element for which the given function returns true - - Testing findLastIndex - - ✔ findLastIndex is a Function - ✔ Finds last index for which the given function returns true - - Testing findLastKey - - ✔ findLastKey is a Function - ✔ Returns the appropriate key - - Testing flatten - - ✔ flatten is a Function - ✔ Flattens an array - ✔ Flattens an array - - Testing flattenObject - - ✔ flattenObject is a Function - ✔ Flattens an object with the paths for keys - ✔ Works with arrays - - Testing flip - - ✔ flip is a Function - ✔ Flips argument order - - Testing forEachRight - - ✔ forEachRight is a Function - ✔ Iterates over the array in reverse - - Testing forOwn - - ✔ forOwn is a Function - ✔ Iterates over an element's key-value pairs - - Testing forOwnRight - - ✔ forOwnRight is a Function - ✔ Iterates over an element's key-value pairs in reverse - - Testing formatDuration - - ✔ 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 - - Testing fromCamelCase - - ✔ fromCamelCase is a Function - ✔ Converts a string from camelcase - ✔ Converts a string from camelcase - ✔ Converts a string from camelcase - - Testing functionName - - ✔ functionName is a Function - ✔ Works for native functions - ✔ Works for functions - ✔ Works for arrow functions - - Testing functions - - ✔ functions is a Function - ✔ Returns own methods - ✔ Returns own and inherited methods - - Testing gcd - - ✔ 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 - - Testing geometricProgression - - ✔ 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 - - Testing get - - ✔ get is a Function - ✔ Retrieve a property indicated by the selector from an object. - - Testing getColonTimeFromDate - - ✔ getColonTimeFromDate is a Function - - Testing getDaysDiffBetweenDates - - ✔ getDaysDiffBetweenDates is a Function - ✔ Returns the difference in days between two dates - - Testing getMeridiemSuffixOfInteger - - ✔ getMeridiemSuffixOfInteger is a Function - - Testing getScrollPosition - - ✔ getScrollPosition is a Function - ✔ Tested by @chalarangelo on 16/02/2018 - - Testing getStyle - - ✔ getStyle is a Function - ✔ Tested by @chalarangelo on 16/02/2018 - - Testing getType - - ✔ getType is a Function - ✔ Returns the native type of a value - - Testing getURLParameters - - ✔ getURLParameters is a Function - ✔ Returns an object containing the parameters of the current URL - - Testing groupBy - - ✔ 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 - - Testing hammingDistance - - ✔ hammingDistance is a Function - ✔ retuns hamming disance between 2 values - - Testing hasClass - - ✔ hasClass is a Function - - Testing hasFlags - - ✔ hasFlags is a Function - ✔ Tested by @chalarangelo on 16/02/2018 - - Testing hashBrowser - - ✔ hashBrowser is a Function - ✔ Tested by @chalarangelo on 16/02/2018 - - Testing hashNode - - ✔ hashNode is a Function - - Testing head - - ✔ 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 - - Testing hexToRGB - - ✔ 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 - - Testing hide - - ✔ hide is a Function - ✔ Tested by @chalarangelo on 16/02/2018 - - Testing howManyTimes - - ✔ howManyTimes is a Function - - Testing httpDelete - - ✔ httpDelete is a Function - - Testing httpGet - - ✔ httpGet is a Function - - Testing httpPost - - ✔ httpPost is a Function - - Testing httpPut - - ✔ httpPut is a Function - - Testing httpsRedirect - - ✔ httpsRedirect is a Function - ✔ Tested on 09/02/2018 by @chalarangelo - - Testing hz - - ✔ hz is a Function - - Testing inRange - - ✔ 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 - - Testing indexOfAll - - ✔ indexOfAll is a Function - ✔ Returns all indices of val in an array - ✔ Returns all indices of val in an array - - Testing initial - - ✔ initial is a Function - ✔ Returns all the elements of an array except the last one - - Testing initialize2DArray - - ✔ initialize2DArray is a Function - ✔ Initializes a 2D array of given width and height and value - - Testing initializeArrayWithRange - - ✔ initializeArrayWithRange is a Function - ✔ Initializes an array containing the numbers in the specified range - - Testing initializeArrayWithRangeRight - - ✔ initializeArrayWithRangeRight is a Function - - Testing initializeArrayWithValues - - ✔ initializeArrayWithValues is a Function - ✔ Initializes and fills an array with the specified values - - Testing initializeNDArray - - ✔ initializeNDArray is a Function - - Testing intersection - - ✔ intersection is a Function - ✔ Returns a list of elements that exist in both arrays - - Testing intersectionBy - - ✔ 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 - - Testing intersectionWith - - ✔ intersectionWith is a Function - ✔ Returns a list of elements that exist in both arrays, using a provided comparator function - - Testing invertKeyValues - - ✔ 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' ] } - - Testing is - - ✔ 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 - - Testing isAbsoluteURL - - ✔ isAbsoluteURL is a Function - ✔ Given string is an absolute URL - ✔ Given string is an absolute URL - ✔ Given string is not an absolute URL - - Testing isAnagram - - ✔ isAnagram is a Function - ✔ Checks valid anagram - ✔ Works with spaces - ✔ Ignores case - ✔ Ignores special characters - - Testing isArmstrongNumber - - ✔ isArmstrongNumber is a Function - - Testing isArray - - ✔ isArray is a Function - ✔ passed value is an array - ✔ passed value is not an array - - Testing isArrayBuffer - - ✔ isArrayBuffer is a Function - - Testing isArrayLike - - ✔ isArrayLike is a Function - ✔ Returns true for a string - ✔ Returns true for an array - ✔ Returns false for null - - Testing isBoolean - - ✔ isBoolean is a Function - ✔ passed value is not a boolean - ✔ passed value is not a boolean - - Testing isBrowser - - ✔ isBrowser is a Function - - Testing isBrowserTabFocused - - ✔ isBrowserTabFocused is a Function - - Testing isDivisible - - ✔ isDivisible is a Function - ✔ The number 6 is divisible by 3 - - Testing isEmpty - - ✔ 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 - - Testing isEven - - ✔ isEven is a Function - ✔ 4 is even number - ✔ undefined - - Testing isFunction - - ✔ isFunction is a Function - ✔ passed value is a function - ✔ passed value is not a function - - Testing isLowerCase - - ✔ isLowerCase is a Function - ✔ passed string is a lowercase - ✔ passed string is a lowercase - ✔ passed value is not a lowercase - - Testing isMap - - ✔ isMap is a Function - - Testing isNil - - ✔ isNil is a Function - ✔ Returns true for null - ✔ Returns true for undefined - ✔ Returns false for an empty string - - Testing isNull - - ✔ isNull is a Function - ✔ passed argument is a null - ✔ passed argument is a null - - Testing isNumber - - ✔ isNumber is a Function - ✔ passed argument is a number - ✔ passed argument is not a number - - Testing isObject - - ✔ 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 - - Testing isObjectLike - - ✔ isObjectLike is a Function - ✔ Returns true for an object - ✔ Returns true for an array - ✔ Returns false for a function - ✔ Returns false for null - - Testing isPlainObject - - ✔ isPlainObject is a Function - ✔ Returns true for a plain object - ✔ Returns false for a Map (example of non-plain object) - - Testing isPrime - - ✔ isPrime is a Function - ✔ passed number is a prime - - Testing isPrimitive - - ✔ 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 - - Testing isPromiseLike - - ✔ isPromiseLike is a Function - ✔ Returns true for a promise-like object - ✔ Returns false for null - ✔ Returns false for an empty object - - Testing isRegExp - - ✔ isRegExp is a Function - - Testing isSet - - ✔ isSet is a Function - - Testing isSimilar - - ✔ isSimilar is a Function - - Testing isSorted - - ✔ 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 - - Testing isString - - ✔ 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 - - Testing isSymbol - - ✔ isSymbol is a Function - ✔ Checks if the given argument is a symbol - - Testing isTravisCI - - ✔ isTravisCI is a Function - ✔ Running on Travis, correctly evaluates - - Testing isTypedArray - - ✔ isTypedArray is a Function - - Testing isUndefined - - ✔ isUndefined is a Function - ✔ Returns true for undefined - - Testing isUpperCase - - ✔ isUpperCase is a Function - ✔ ABC is all upper case - ✔ abc is not all upper case - ✔ A3@$ is all uppercase - - Testing isValidJSON - - ✔ 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 - - Testing isWeakMap - - ✔ isWeakMap is a Function - - Testing isWeakSet - - ✔ isWeakSet is a Function - - Testing join - - ✔ 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 - - Testing last - - ✔ 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 - - Testing lcm - - ✔ lcm is a Function - ✔ Returns the least common multiple of two or more numbers. - ✔ Returns the least common multiple of two or more numbers. - - Testing levenshteinDistance - - ✔ levenshteinDistance is a Function - - Testing longestItem - - ✔ longestItem is a Function - ✔ Returns the longest object - - Testing lowercaseKeys - - ✔ lowercaseKeys is a Function - ✔ Lowercases object keys - ✔ Does not mutate original object - - Testing luhnCheck - - ✔ luhnCheck is a Function - ✔ validates identification number - ✔ validates identification number - ✔ validates identification number - - Testing mapKeys - - ✔ mapKeys is a Function - ✔ Maps keys - - Testing mapObject - - ✔ 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 } - - Testing mapValues - - ✔ mapValues is a Function - ✔ Maps values - - Testing mask - - ✔ 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 - - Testing matches - - ✔ matches is a Function - ✔ Matches returns true for two similar objects - ✔ Matches returns false for two non-similar objects - - Testing matchesWith - - ✔ matchesWith is a Function - ✔ Returns true for two objects with similar values, based on the provided function - - Testing maxBy - - ✔ maxBy is a Function - ✔ Produces the right result with a function - ✔ Produces the right result with a property name - - Testing maxN - - ✔ maxN is a Function - ✔ Returns the n maximum elements from the provided array - ✔ Returns the n maximum elements from the provided array - - Testing median - - ✔ median is a Function - ✔ Returns the median of an array of numbers - ✔ Returns the median of an array of numbers - - Testing memoize - - ✔ memoize is a Function - ✔ Function works properly - ✔ Function works properly - ✔ Cache stores values - - Testing merge - - ✔ merge is a Function - ✔ Merges two objects - - Testing minBy - - ✔ minBy is a Function - ✔ Produces the right result with a function - ✔ Produces the right result with a property name - - Testing minN - - ✔ minN is a Function - ✔ Returns the n minimum elements from the provided array - ✔ Returns the n minimum elements from the provided array - - Testing mostPerformant - - ✔ mostPerformant is a Function - ✔ Tested by @chalarangelo on 16/02/2018 - - Testing negate - - ✔ negate is a Function - ✔ Negates a predicate function - - Testing nest - - ✔ nest is a Function - - Testing nodeListToArray - - ✔ nodeListToArray is a Function - - Testing none - - ✔ 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 - - Testing nthArg - - ✔ nthArg is a Function - ✔ Returns the nth argument - ✔ Returns undefined if arguments too few - ✔ Works for negative values - - Testing nthElement - - ✔ nthElement is a Function - ✔ Returns the nth element of an array. - ✔ Returns the nth element of an array. - - Testing objectFromPairs - - ✔ objectFromPairs is a Function - ✔ Creates an object from the given key-value pairs. - - Testing objectToPairs - - ✔ objectToPairs is a Function - ✔ Creates an array of key-value pair arrays from an object. - - Testing observeMutations - - ✔ observeMutations is a Function - ✔ Tested on 09/02/2018 by @chalarangelo - - Testing off - - ✔ off is a Function - ✔ Tested by @chalarangelo on 16/02/2018 - - Testing offset - - ✔ 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. - - Testing omit - - ✔ omit is a Function - ✔ Omits the key-value pairs corresponding to the given keys from an object - - Testing omitBy - - ✔ omitBy is a Function - ✔ Creates an object composed of the properties the given function returns falsey for - - Testing on - - ✔ on is a Function - ✔ Tested by @chalarangelo on 16/02/2018 - - Testing onUserInputChange - - ✔ onUserInputChange is a Function - ✔ Tested by @chalarangelo on 16/02/2018 - - Testing once - - ✔ once is a Function - ✔ Tested by @chalarangelo on 16/02/2018 - - Testing orderBy - - ✔ 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. - - Testing over - - ✔ over is a Function - ✔ Applies given functions over multiple arguments - - Testing overArgs - - ✔ overArgs is a Function - ✔ Invokes the provided function with its arguments transformed - - Testing pad - - ✔ 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 - - Testing palindrome - - ✔ palindrome is a Function - ✔ Given string is a palindrome - ✔ Given string is not a palindrome - - Testing parseCookie - - ✔ parseCookie is a Function - ✔ Parses the cookie - - Testing partial - - ✔ partial is a Function - ✔ Prepends arguments - - Testing partialRight - - ✔ partialRight is a Function - ✔ Appends arguments - - Testing partition - - ✔ partition is a Function - ✔ Groups the elements into two arrays, depending on the provided function's truthiness for each element. - - Testing percentile - - ✔ 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. - - Testing permutations - - ✔ permutations is a Function - ✔ Generates all permutations of an array - - Testing pick - - ✔ pick is a Function - ✔ Picks the key-value pairs corresponding to the given keys from an object. - - Testing pickBy - - ✔ pickBy is a Function - ✔ Creates an object composed of the properties the given function returns truthy for. - - Testing pipeAsyncFunctions - - ✔ pipeAsyncFunctions is a Function - ✔ Produces the appropriate hash - ✔ pipeAsyncFunctions result should be 15 - - Testing pipeFunctions - - ✔ pipeFunctions is a Function - ✔ Performs left-to-right function composition - - Testing pluralize - - ✔ 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 - - Testing powerset - - ✔ powerset is a Function - ✔ Returns the powerset of a given array of numbers. - - Testing prefix - - ✔ prefix is a Function - - Testing prettyBytes - - ✔ 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. - - Testing primes - - ✔ primes is a Function - ✔ Generates primes up to a given number, using the Sieve of Eratosthenes. - - Testing promisify - - ✔ promisify is a Function - ✔ Returns a promise - - Testing pull - - ✔ pull is a Function - ✔ Pulls the specified values - - Testing pullAtIndex - - ✔ pullAtIndex is a Function - ✔ Pulls the given values - ✔ Pulls the given values - - Testing pullAtValue - - ✔ pullAtValue is a Function - ✔ Pulls the specified values - ✔ Pulls the specified values - - Testing pullBy - - ✔ pullBy is a Function - ✔ Pulls the specified values - - Testing quickSort - - ✔ 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 - - Testing radsToDegrees - - ✔ radsToDegrees is a Function - ✔ Returns the appropriate value - - Testing randomHexColorCode - - ✔ randomHexColorCode is a Function - ✔ should be equal - ✔ The color code starts with "#" - ✔ The color code contains only valid hex-digits - - Testing randomIntArrayInRange - - ✔ 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). - - Testing randomIntegerInRange - - ✔ randomIntegerInRange is a Function - ✔ The returned value is an integer - ✔ The returned value lies between provided lowerLimit and upperLimit (both inclusive). - - Testing randomNumberInRange - - ✔ randomNumberInRange is a Function - ✔ The returned value is a number - ✔ The returned value lies between provided lowerLimit and upperLimit (both inclusive). - - Testing readFileLines - - ✔ readFileLines is a Function - ✔ Tested on 09/02/2018 by @chalarangelo - - Testing rearg - - ✔ rearg is a Function - ✔ Reorders arguments in invoked function - - Testing recordAnimationFrames - - ✔ recordAnimationFrames is a Function - - Testing redirect - - ✔ redirect is a Function - ✔ Tested on 09/02/2018 by @chalarangelo - - Testing reduceSuccessive - - ✔ reduceSuccessive is a Function - ✔ Returns the array of successively reduced values - - Testing reduceWhich - - ✔ 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 - - Testing reducedFilter - - ✔ reducedFilter is a Function - ✔ Filter an array of objects based on a condition while also filtering out unspecified keys. - - Testing reject - - ✔ reject is a Function - ✔ should be equivalent - ✔ should be equivalent - - Testing remove - - ✔ remove is a Function - ✔ Removes elements from an array for which the given function returns false - - Testing removeNonASCII - - ✔ removeNonASCII is a Function - ✔ Removes non-ASCII characters - - Testing removeVowels - - ✔ removeVowels is a Function - - Testing renameKeys - - ✔ renameKeys is a Function - ✔ should be equivalent - - Testing reverseString - - ✔ reverseString is a Function - ✔ Reverses a string. - - Testing round - - ✔ 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 - - Testing runAsync - - ✔ runAsync is a Function - ✔ Tested on 09/02/2018 by @chalarangelo - - Testing runPromisesInSeries - - ✔ runPromisesInSeries is a Function - - Testing sample - - ✔ sample is a Function - ✔ Returns a random element from the array - ✔ Works for single-element arrays - ✔ Returns undefined for empty array - - Testing sampleSize - - ✔ 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 - - Testing scrollToTop - - ✔ scrollToTop is a Function - ✔ Tested on 09/02/2018 by @chalarangelo - - Testing sdbm - - ✔ sdbm is a Function - ✔ Hashes the input string into a whole number. - - Testing serializeCookie - - ✔ serializeCookie is a Function - ✔ Serializes the cookie - - Testing setStyle - - ✔ setStyle is a Function - ✔ Tested by @chalarangelo on 16/02/2018 - - Testing shallowClone - - ✔ shallowClone is a Function - ✔ Shallow cloning works - ✔ Does not clone deeply - - Testing show - - ✔ show is a Function - ✔ Tested by @chalarangelo on 16/02/2018 - - Testing shuffle - - ✔ shuffle is a Function - ✔ Shuffles the array - ✔ New array contains all original elements - ✔ Works for empty arrays - ✔ Works for single-element arrays - - Testing similarity - - ✔ similarity is a Function - ✔ Returns an array of elements that appear in both arrays. - - Testing size - - ✔ size is a Function - ✔ Get size of arrays, objects or strings. - ✔ Get size of arrays, objects or strings. - - Testing sleep - - ✔ sleep is a Function - - Testing smoothScroll - - ✔ smoothScroll is a Function - - Testing solveRPN - - ✔ solveRPN is a Function - - Testing sortCharactersInString - - ✔ sortCharactersInString is a Function - ✔ Alphabetically sorts the characters in a string. - - Testing sortedIndex - - ✔ 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. - - Testing sortedIndexBy - - ✔ sortedIndexBy is a Function - ✔ Returns the lowest index to insert the element without messing up the list order - - Testing sortedLastIndex - - ✔ sortedLastIndex is a Function - ✔ Returns the highest index to insert the element without messing up the list order - - Testing sortedLastIndexBy - - ✔ sortedLastIndexBy is a Function - ✔ Returns the highest index to insert the element without messing up the list order - - Testing speechSynthesis - - ✔ speechSynthesis is a Function - - Testing splitLines - - ✔ splitLines is a Function - ✔ Splits a multiline string into an array of lines. - - Testing spreadOver - - ✔ 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. - - Testing stableSort - - ✔ stableSort is a Function - ✔ Array is properly sorted - - Testing standardDeviation - - ✔ standardDeviation is a Function - ✔ Returns the standard deviation of an array of numbers - ✔ Returns the standard deviation of an array of numbers - - Testing stringPermutations - - ✔ stringPermutations is a Function - ✔ Generates all stringPermutations of a string - ✔ Works for single-letter strings - ✔ Works for empty strings - - Testing stripHTMLTags - - ✔ stripHTMLTags is a Function - ✔ Removes HTML tags - - Testing sum - - ✔ sum is a Function - ✔ Returns the sum of two or more numbers/arrays. - - Testing sumBy - - ✔ sumBy is a Function - - Testing sumPower - - ✔ 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 - - Testing symmetricDifference - - ✔ symmetricDifference is a Function - ✔ Returns the symmetric difference between two arrays. - - Testing symmetricDifferenceBy - - ✔ symmetricDifferenceBy is a Function - ✔ Returns the symmetric difference between two arrays, after applying the provided function to each array element of both - - Testing symmetricDifferenceWith - - ✔ symmetricDifferenceWith is a Function - ✔ Returns the symmetric difference between two arrays, using a provided function as a comparator - - Testing tail - - ✔ tail is a Function - ✔ Returns tail - ✔ Returns tail - - Testing take - - ✔ take is a Function - ✔ Returns an array with n elements removed from the beginning. - ✔ Returns an array with n elements removed from the beginning. - - Testing takeRight - - ✔ takeRight is a Function - ✔ Returns an array with n elements removed from the end - ✔ Returns an array with n elements removed from the end - - Testing takeRightWhile - - ✔ takeRightWhile is a Function - ✔ Removes elements until the function returns true - - Testing takeWhile - - ✔ takeWhile is a Function - ✔ Removes elements until the function returns true - - 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 deleted file mode 100644 index fcd88a603..000000000 --- a/test/throttle/throttle.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/timeTaken/timeTaken.test.js b/test/timeTaken/timeTaken.test.js deleted file mode 100644 index fd72e9d13..000000000 --- a/test/timeTaken/timeTaken.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/times/times.test.js b/test/times/times.test.js deleted file mode 100644 index dcf2d7e28..000000000 --- a/test/times/times.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/toCamelCase/toCamelCase.test.js b/test/toCamelCase/toCamelCase.test.js deleted file mode 100644 index 0f3efc557..000000000 --- a/test/toCamelCase/toCamelCase.test.js +++ /dev/null @@ -1,22 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/toCurrency/toCurrency.test.js b/test/toCurrency/toCurrency.test.js deleted file mode 100644 index 16423c0c1..000000000 --- a/test/toCurrency/toCurrency.test.js +++ /dev/null @@ -1,18 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/toDecimalMark/toDecimalMark.test.js b/test/toDecimalMark/toDecimalMark.test.js deleted file mode 100644 index 0da36d864..000000000 --- a/test/toDecimalMark/toDecimalMark.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/toHash/toHash.test.js b/test/toHash/toHash.test.js deleted file mode 100644 index a7c2e931f..000000000 --- a/test/toHash/toHash.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/toKebabCase/toKebabCase.test.js b/test/toKebabCase/toKebabCase.test.js deleted file mode 100644 index ab360940d..000000000 --- a/test/toKebabCase/toKebabCase.test.js +++ /dev/null @@ -1,22 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/toOrdinalSuffix/toOrdinalSuffix.test.js b/test/toOrdinalSuffix/toOrdinalSuffix.test.js deleted file mode 100644 index a58c7cf64..000000000 --- a/test/toOrdinalSuffix/toOrdinalSuffix.test.js +++ /dev/null @@ -1,18 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/toSafeInteger/toSafeInteger.test.js b/test/toSafeInteger/toSafeInteger.test.js deleted file mode 100644 index 885f6e324..000000000 --- a/test/toSafeInteger/toSafeInteger.test.js +++ /dev/null @@ -1,24 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/toSnakeCase/toSnakeCase.test.js b/test/toSnakeCase/toSnakeCase.test.js deleted file mode 100644 index 72190fda2..000000000 --- a/test/toSnakeCase/toSnakeCase.test.js +++ /dev/null @@ -1,22 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/toggleClass/toggleClass.test.js b/test/toggleClass/toggleClass.test.js deleted file mode 100644 index f0bbe14d6..000000000 --- a/test/toggleClass/toggleClass.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/tomorrow/tomorrow.test.js b/test/tomorrow/tomorrow.test.js deleted file mode 100644 index a9f77a544..000000000 --- a/test/tomorrow/tomorrow.test.js +++ /dev/null @@ -1,18 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/transform/transform.test.js b/test/transform/transform.test.js deleted file mode 100644 index 4e3529509..000000000 --- a/test/transform/transform.test.js +++ /dev/null @@ -1,21 +0,0 @@ -const test = require('tape'); -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( - { 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(); -}); diff --git a/test/truncateString/truncateString.test.js b/test/truncateString/truncateString.test.js deleted file mode 100644 index 8022f5a6c..000000000 --- a/test/truncateString/truncateString.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/truthCheckCollection/truthCheckCollection.test.js b/test/truthCheckCollection/truthCheckCollection.test.js deleted file mode 100644 index a844c925b..000000000 --- a/test/truthCheckCollection/truthCheckCollection.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/unary/unary.test.js b/test/unary/unary.test.js deleted file mode 100644 index 4ea62e7a1..000000000 --- a/test/unary/unary.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/uncurry/uncurry.test.js b/test/uncurry/uncurry.test.js deleted file mode 100644 index 76ef507fa..000000000 --- a/test/uncurry/uncurry.test.js +++ /dev/null @@ -1,20 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/unescapeHTML/unescapeHTML.test.js b/test/unescapeHTML/unescapeHTML.test.js deleted file mode 100644 index 460a20106..000000000 --- a/test/unescapeHTML/unescapeHTML.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/unflattenObject/unflattenObject.test.js b/test/unflattenObject/unflattenObject.test.js deleted file mode 100644 index 05ac15d70..000000000 --- a/test/unflattenObject/unflattenObject.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/unfold/unfold.test.js b/test/unfold/unfold.test.js deleted file mode 100644 index bf14e7290..000000000 --- a/test/unfold/unfold.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/union/union.test.js b/test/union/union.test.js deleted file mode 100644 index fd6157918..000000000 --- a/test/union/union.test.js +++ /dev/null @@ -1,24 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/unionBy/unionBy.test.js b/test/unionBy/unionBy.test.js deleted file mode 100644 index c412368ce..000000000 --- a/test/unionBy/unionBy.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/unionWith/unionWith.test.js b/test/unionWith/unionWith.test.js deleted file mode 100644 index 852226eb9..000000000 --- a/test/unionWith/unionWith.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/uniqueElements/uniqueElements.test.js b/test/uniqueElements/uniqueElements.test.js deleted file mode 100644 index 2dd158e08..000000000 --- a/test/uniqueElements/uniqueElements.test.js +++ /dev/null @@ -1,28 +0,0 @@ -const test = require('tape'); -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(); -}); - -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 deleted file mode 100644 index 1e00ff510..000000000 --- a/test/untildify/untildify.test.js +++ /dev/null @@ -1,16 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/unzip/unzip.test.js b/test/unzip/unzip.test.js deleted file mode 100644 index acfddc110..000000000 --- a/test/unzip/unzip.test.js +++ /dev/null @@ -1,15 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/unzipWith/unzipWith.test.js b/test/unzipWith/unzipWith.test.js deleted file mode 100644 index a9416e7c2..000000000 --- a/test/unzipWith/unzipWith.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/validateNumber/validateNumber.test.js b/test/validateNumber/validateNumber.test.js deleted file mode 100644 index e8037cc65..000000000 --- a/test/validateNumber/validateNumber.test.js +++ /dev/null @@ -1,22 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/without/without.test.js b/test/without/without.test.js deleted file mode 100644 index 7d9fa7e70..000000000 --- a/test/without/without.test.js +++ /dev/null @@ -1,19 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/words/words.test.js b/test/words/words.test.js deleted file mode 100644 index 1c8a7fda7..000000000 --- a/test/words/words.test.js +++ /dev/null @@ -1,19 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/xProd/xProd.test.js b/test/xProd/xProd.test.js deleted file mode 100644 index 9bc6571de..000000000 --- a/test/xProd/xProd.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/yesNo/yesNo.test.js b/test/yesNo/yesNo.test.js deleted file mode 100644 index 6b7c66d1c..000000000 --- a/test/yesNo/yesNo.test.js +++ /dev/null @@ -1,22 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/zip/zip.test.js b/test/zip/zip.test.js deleted file mode 100644 index 8e6ce6747..000000000 --- a/test/zip/zip.test.js +++ /dev/null @@ -1,18 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/zipObject/zipObject.test.js b/test/zipObject/zipObject.test.js deleted file mode 100644 index 83ba782a0..000000000 --- a/test/zipObject/zipObject.test.js +++ /dev/null @@ -1,19 +0,0 @@ -const test = require('tape'); -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(); -}); diff --git a/test/zipWith/zipWith.test.js b/test/zipWith/zipWith.test.js deleted file mode 100644 index 2cf409e24..000000000 --- a/test/zipWith/zipWith.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const test = require('tape'); -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 diff --git a/test/defaults/defaults.js b/test2/defaults/defaults.js similarity index 100% rename from test/defaults/defaults.js rename to test2/defaults/defaults.js diff --git a/test2/defaults/defaults.test.js b/test2/defaults/defaults.test.js new file mode 100644 index 000000000..79c5a5472 --- /dev/null +++ b/test2/defaults/defaults.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const defaults = require('./defaults.js'); + +test('Testing defaults', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof defaults === 'function').toBeTruthy(); + expect(defaults({ a: 1 }, { b: 2 }, { b: 6 }, { a: 3 })).toEqual({ a: 1, b: 2 }); +}); diff --git a/test/defer/defer.js b/test2/defer/defer.js similarity index 100% rename from test/defer/defer.js rename to test2/defer/defer.js diff --git a/test2/defer/defer.test.js b/test2/defer/defer.test.js new file mode 100644 index 000000000..c5db044d2 --- /dev/null +++ b/test2/defer/defer.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const defer = require('./defer.js'); + +test('Testing defer', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof defer === 'function').toBeTruthy(); +}); diff --git a/test/degreesToRads/degreesToRads.js b/test2/degreesToRads/degreesToRads.js similarity index 100% rename from test/degreesToRads/degreesToRads.js rename to test2/degreesToRads/degreesToRads.js diff --git a/test2/degreesToRads/degreesToRads.test.js b/test2/degreesToRads/degreesToRads.test.js new file mode 100644 index 000000000..742faaad3 --- /dev/null +++ b/test2/degreesToRads/degreesToRads.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const degreesToRads = require('./degreesToRads.js'); + +test('Testing degreesToRads', () => { + //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 + expect(typeof degreesToRads === 'function').toBeTruthy(); + expect(approxeq(degreesToRads(90.0), Math.PI / 2)).toBeTruthy(); +}); diff --git a/test/delay/delay.js b/test2/delay/delay.js similarity index 100% rename from test/delay/delay.js rename to test2/delay/delay.js diff --git a/test2/delay/delay.test.js b/test2/delay/delay.test.js new file mode 100644 index 000000000..68fc4dd89 --- /dev/null +++ b/test2/delay/delay.test.js @@ -0,0 +1,15 @@ +const expect = require('expect'); +const delay = require('./delay.js'); + +test('Testing delay', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof delay === 'function').toBeTruthy(); + delay( + function(text) { + expect(text).toBe('test'); + }, + 1000, + 'test' + ); +}); diff --git a/test/detectDeviceType/detectDeviceType.js b/test2/detectDeviceType/detectDeviceType.js similarity index 100% rename from test/detectDeviceType/detectDeviceType.js rename to test2/detectDeviceType/detectDeviceType.js diff --git a/test2/detectDeviceType/detectDeviceType.test.js b/test2/detectDeviceType/detectDeviceType.test.js new file mode 100644 index 000000000..708f7ebe6 --- /dev/null +++ b/test2/detectDeviceType/detectDeviceType.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const detectDeviceType = require('./detectDeviceType.js'); + +test('Testing detectDeviceType', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof detectDeviceType === 'function').toBeTruthy(); +}); diff --git a/test/difference/difference.js b/test2/difference/difference.js similarity index 100% rename from test/difference/difference.js rename to test2/difference/difference.js diff --git a/test2/difference/difference.test.js b/test2/difference/difference.test.js new file mode 100644 index 000000000..21e4fac21 --- /dev/null +++ b/test2/difference/difference.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const difference = require('./difference.js'); + +test('Testing difference', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof difference === 'function').toBeTruthy(); + expect(difference([1, 2, 3], [1, 2, 4])).toEqual([3]); +}); \ No newline at end of file diff --git a/test/differenceBy/differenceBy.js b/test2/differenceBy/differenceBy.js similarity index 100% rename from test/differenceBy/differenceBy.js rename to test2/differenceBy/differenceBy.js diff --git a/test2/differenceBy/differenceBy.test.js b/test2/differenceBy/differenceBy.test.js new file mode 100644 index 000000000..4d7dfe471 --- /dev/null +++ b/test2/differenceBy/differenceBy.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const differenceBy = require('./differenceBy.js'); + +test('Testing differenceBy', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof differenceBy === 'function').toBeTruthy(); + expect(differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor)).toEqual([1.2]); + expect(differenceBy([{ x: 2 }, { x: 1 }], [{ x: 1 }], v => v.x)).toEqual([ { x: 2 } ]); +}); diff --git a/test/differenceWith/differenceWith.js b/test2/differenceWith/differenceWith.js similarity index 100% rename from test/differenceWith/differenceWith.js rename to test2/differenceWith/differenceWith.js diff --git a/test2/differenceWith/differenceWith.test.js b/test2/differenceWith/differenceWith.test.js new file mode 100644 index 000000000..0e27a4501 --- /dev/null +++ b/test2/differenceWith/differenceWith.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const differenceWith = require('./differenceWith.js'); + +test('Testing differenceWith', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof differenceWith === 'function').toBeTruthy(); + 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]); +}); \ No newline at end of file diff --git a/test/digitize/digitize.js b/test2/digitize/digitize.js similarity index 100% rename from test/digitize/digitize.js rename to test2/digitize/digitize.js diff --git a/test2/digitize/digitize.test.js b/test2/digitize/digitize.test.js new file mode 100644 index 000000000..75b554e53 --- /dev/null +++ b/test2/digitize/digitize.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const digitize = require('./digitize.js'); + +test('Testing digitize', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof digitize === 'function').toBeTruthy(); + expect(digitize(123)).toEqual([1, 2, 3]); +}); \ No newline at end of file diff --git a/test/distance/distance.js b/test2/distance/distance.js similarity index 100% rename from test/distance/distance.js rename to test2/distance/distance.js diff --git a/test2/distance/distance.test.js b/test2/distance/distance.test.js new file mode 100644 index 000000000..495cf60c0 --- /dev/null +++ b/test2/distance/distance.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const distance = require('./distance.js'); + +test('Testing distance', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof distance === 'function').toBeTruthy(); + expect(distance(1, 1, 2, 3)).toBe(2.23606797749979); +}); diff --git a/test/drop/drop.js b/test2/drop/drop.js similarity index 100% rename from test/drop/drop.js rename to test2/drop/drop.js diff --git a/test2/drop/drop.test.js b/test2/drop/drop.test.js new file mode 100644 index 000000000..ea9715842 --- /dev/null +++ b/test2/drop/drop.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const drop = require('./drop.js'); + +test('Testing drop', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof drop === 'function').toBeTruthy(); + expect(drop([1, 2, 3])).toEqual([2,3]); + expect(drop([1, 2, 3], 2)).toEqual([3]); + expect(drop([1, 2, 3], 42)).toEqual([]); +}); diff --git a/test/dropRight/dropRight.js b/test2/dropRight/dropRight.js similarity index 100% rename from test/dropRight/dropRight.js rename to test2/dropRight/dropRight.js diff --git a/test2/dropRight/dropRight.test.js b/test2/dropRight/dropRight.test.js new file mode 100644 index 000000000..ffd46e6d3 --- /dev/null +++ b/test2/dropRight/dropRight.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const dropRight = require('./dropRight.js'); + +test('Testing dropRight', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof dropRight === 'function').toBeTruthy(); + expect(dropRight([1, 2, 3])).toEqual([1,2]); + expect(dropRight([1, 2, 3], 2)).toEqual([1]); + expect(dropRight([1, 2, 3], 42)).toEqual([]); +}); \ No newline at end of file diff --git a/test/dropRightWhile/dropRightWhile.js b/test2/dropRightWhile/dropRightWhile.js similarity index 100% rename from test/dropRightWhile/dropRightWhile.js rename to test2/dropRightWhile/dropRightWhile.js diff --git a/test2/dropRightWhile/dropRightWhile.test.js b/test2/dropRightWhile/dropRightWhile.test.js new file mode 100644 index 000000000..1df6588a5 --- /dev/null +++ b/test2/dropRightWhile/dropRightWhile.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const dropRightWhile = require('./dropRightWhile.js'); + +test('Testing dropRightWhile', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof dropRightWhile === 'function').toBeTruthy(); + expect(dropRightWhile([1, 2, 3, 4], n => n < 3)).toEqual([1, 2]); +}); diff --git a/test/dropWhile/dropWhile.js b/test2/dropWhile/dropWhile.js similarity index 100% rename from test/dropWhile/dropWhile.js rename to test2/dropWhile/dropWhile.js diff --git a/test2/dropWhile/dropWhile.test.js b/test2/dropWhile/dropWhile.test.js new file mode 100644 index 000000000..8a2be7a17 --- /dev/null +++ b/test2/dropWhile/dropWhile.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const dropWhile = require('./dropWhile.js'); + +test('Testing dropWhile', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof dropWhile === 'function').toBeTruthy(); + expect(dropWhile([1, 2, 3, 4], n => n >= 3)).toEqual([3,4]); +}); diff --git a/test/elementIsVisibleInViewport/elementIsVisibleInViewport.js b/test2/elementIsVisibleInViewport/elementIsVisibleInViewport.js similarity index 100% rename from test/elementIsVisibleInViewport/elementIsVisibleInViewport.js rename to test2/elementIsVisibleInViewport/elementIsVisibleInViewport.js diff --git a/test2/elementIsVisibleInViewport/elementIsVisibleInViewport.test.js b/test2/elementIsVisibleInViewport/elementIsVisibleInViewport.test.js new file mode 100644 index 000000000..2707cbc4e --- /dev/null +++ b/test2/elementIsVisibleInViewport/elementIsVisibleInViewport.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const elementIsVisibleInViewport = require('./elementIsVisibleInViewport.js'); + +test('Testing elementIsVisibleInViewport', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof elementIsVisibleInViewport === 'function').toBeTruthy(); +}); diff --git a/test/elo/elo.js b/test2/elo/elo.js similarity index 100% rename from test/elo/elo.js rename to test2/elo/elo.js diff --git a/test2/elo/elo.test.js b/test2/elo/elo.test.js new file mode 100644 index 000000000..a0c483696 --- /dev/null +++ b/test2/elo/elo.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const elo = require('./elo.js'); + +test('Testing elo', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof elo === 'function').toBeTruthy(); + expect(elo([1200, 1200])).toEqual([1216, 1184]); + expect(elo([1200, 1200], 64)).toEqual([1232, 1168]), "Standard 1v1s"; + expect(elo([1200, 1200, 1200, 1200]).map(Math.round)).toEqual([1246, 1215, 1185, 1154]); +}); \ No newline at end of file diff --git a/test/equals/equals.js b/test2/equals/equals.js similarity index 100% rename from test/equals/equals.js rename to test2/equals/equals.js diff --git a/test2/equals/equals.test.js b/test2/equals/equals.test.js new file mode 100644 index 000000000..f84987498 --- /dev/null +++ b/test2/equals/equals.test.js @@ -0,0 +1,15 @@ +const expect = require('expect'); +const equals = require('./equals.js'); + +test('Testing equals', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof equals === 'function').toBeTruthy(); + expect( + equals({ a: [2, {e: 3}], b: [4], c: 'foo' }, { a: [2, {e: 3}], b: [4], c: 'foo' }) + ).toBeTruthy(); + expect(equals([1, 2, 3], [1, 2, 3])).toBeTruthy(); + expect(equals({ a: [2, 3], b: [4] }, { a: [2, 3], b: [6] })).toBeFalsy(); + expect(equals([1, 2, 3], [1, 2, 4])).toBeFalsy(); + expect(equals([1, 2, 3], { 0: 1, 1: 2, 2: 3 })).toBeTruthy(); +}); diff --git a/test/escapeHTML/escapeHTML.js b/test2/escapeHTML/escapeHTML.js similarity index 100% rename from test/escapeHTML/escapeHTML.js rename to test2/escapeHTML/escapeHTML.js diff --git a/test2/escapeHTML/escapeHTML.test.js b/test2/escapeHTML/escapeHTML.test.js new file mode 100644 index 000000000..a040ed437 --- /dev/null +++ b/test2/escapeHTML/escapeHTML.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const escapeHTML = require('./escapeHTML.js'); + +test('Testing escapeHTML', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof escapeHTML === 'function').toBeTruthy(); + expect(escapeHTML('Me & you')).toBe('<a href="#">Me & you</a>'); +}); \ No newline at end of file diff --git a/test/escapeRegExp/escapeRegExp.js b/test2/escapeRegExp/escapeRegExp.js similarity index 100% rename from test/escapeRegExp/escapeRegExp.js rename to test2/escapeRegExp/escapeRegExp.js diff --git a/test2/escapeRegExp/escapeRegExp.test.js b/test2/escapeRegExp/escapeRegExp.test.js new file mode 100644 index 000000000..1890779fb --- /dev/null +++ b/test2/escapeRegExp/escapeRegExp.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const escapeRegExp = require('./escapeRegExp.js'); + +test('Testing escapeRegExp', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof escapeRegExp === 'function').toBeTruthy(); + expect(escapeRegExp('(test)')).toBe('\\(test\\)'); +}); \ No newline at end of file diff --git a/test/everyNth/everyNth.js b/test2/everyNth/everyNth.js similarity index 100% rename from test/everyNth/everyNth.js rename to test2/everyNth/everyNth.js diff --git a/test2/everyNth/everyNth.test.js b/test2/everyNth/everyNth.test.js new file mode 100644 index 000000000..7301eeeed --- /dev/null +++ b/test2/everyNth/everyNth.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const everyNth = require('./everyNth.js'); + +test('Testing everyNth', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof everyNth === 'function').toBeTruthy(); + expect(everyNth([1, 2, 3, 4, 5, 6], 2)).toEqual([ 2, 4, 6 ]); +}); \ No newline at end of file diff --git a/test/extendHex/extendHex.js b/test2/extendHex/extendHex.js similarity index 100% rename from test/extendHex/extendHex.js rename to test2/extendHex/extendHex.js diff --git a/test2/extendHex/extendHex.test.js b/test2/extendHex/extendHex.test.js new file mode 100644 index 000000000..172c9259e --- /dev/null +++ b/test2/extendHex/extendHex.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const extendHex = require('./extendHex.js'); + +test('Testing extendHex', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof extendHex === 'function').toBeTruthy(); + expect(extendHex('#03f')).toBe('#0033ff'); + expect(extendHex('05a')).toBe('#0055aa'); +}); \ No newline at end of file diff --git a/test/factorial/factorial.js b/test2/factorial/factorial.js similarity index 100% rename from test/factorial/factorial.js rename to test2/factorial/factorial.js diff --git a/test2/factorial/factorial.test.js b/test2/factorial/factorial.test.js new file mode 100644 index 000000000..ea04c6b50 --- /dev/null +++ b/test2/factorial/factorial.test.js @@ -0,0 +1,13 @@ +const expect = require('expect'); +const factorial = require('./factorial.js'); + +test('Testing factorial', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof factorial === 'function').toBeTruthy(); + expect(factorial(6)).toBe(720); + expect(factorial(0)).toBe(1); + expect(factorial(1)).toBe(1); + expect(factorial(4)).toBe(24); + expect(factorial(10)).toBe(3628800); +}); \ No newline at end of file diff --git a/test/factors/factors.js b/test2/factors/factors.js similarity index 100% rename from test/factors/factors.js rename to test2/factors/factors.js diff --git a/test2/factors/factors.test.js b/test2/factors/factors.test.js new file mode 100644 index 000000000..458b48f5c --- /dev/null +++ b/test2/factors/factors.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const factors = require('./factors.js'); + +test('Testing factors', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof factors === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/fibonacci/fibonacci.js b/test2/fibonacci/fibonacci.js similarity index 100% rename from test/fibonacci/fibonacci.js rename to test2/fibonacci/fibonacci.js diff --git a/test2/fibonacci/fibonacci.test.js b/test2/fibonacci/fibonacci.test.js new file mode 100644 index 000000000..cd3be86df --- /dev/null +++ b/test2/fibonacci/fibonacci.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const fibonacci = require('./fibonacci.js'); + +test('Testing fibonacci', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof fibonacci === 'function').toBeTruthy(); + expect(fibonacci(6)).toEqual([0, 1, 1, 2, 3, 5]); +}); \ No newline at end of file diff --git a/test/fibonacciCountUntilNum/fibonacciCountUntilNum.js b/test2/fibonacciCountUntilNum/fibonacciCountUntilNum.js similarity index 100% rename from test/fibonacciCountUntilNum/fibonacciCountUntilNum.js rename to test2/fibonacciCountUntilNum/fibonacciCountUntilNum.js diff --git a/test2/fibonacciCountUntilNum/fibonacciCountUntilNum.test.js b/test2/fibonacciCountUntilNum/fibonacciCountUntilNum.test.js new file mode 100644 index 000000000..b54b33bf5 --- /dev/null +++ b/test2/fibonacciCountUntilNum/fibonacciCountUntilNum.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const fibonacciCountUntilNum = require('./fibonacciCountUntilNum.js'); + +test('Testing fibonacciCountUntilNum', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof fibonacciCountUntilNum === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/fibonacciUntilNum/fibonacciUntilNum.js b/test2/fibonacciUntilNum/fibonacciUntilNum.js similarity index 100% rename from test/fibonacciUntilNum/fibonacciUntilNum.js rename to test2/fibonacciUntilNum/fibonacciUntilNum.js diff --git a/test2/fibonacciUntilNum/fibonacciUntilNum.test.js b/test2/fibonacciUntilNum/fibonacciUntilNum.test.js new file mode 100644 index 000000000..77d6970ae --- /dev/null +++ b/test2/fibonacciUntilNum/fibonacciUntilNum.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const fibonacciUntilNum = require('./fibonacciUntilNum.js'); + +test('Testing fibonacciUntilNum', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof fibonacciUntilNum === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/filterNonUnique/filterNonUnique.js b/test2/filterNonUnique/filterNonUnique.js similarity index 100% rename from test/filterNonUnique/filterNonUnique.js rename to test2/filterNonUnique/filterNonUnique.js diff --git a/test2/filterNonUnique/filterNonUnique.test.js b/test2/filterNonUnique/filterNonUnique.test.js new file mode 100644 index 000000000..05009e044 --- /dev/null +++ b/test2/filterNonUnique/filterNonUnique.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const filterNonUnique = require('./filterNonUnique.js'); + +test('Testing filterNonUnique', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof filterNonUnique === 'function').toBeTruthy(); + expect(filterNonUnique([1, 2, 2, 3, 4, 4, 5])).toEqual([1,3,5]); +}); \ No newline at end of file diff --git a/test/findKey/findKey.js b/test2/findKey/findKey.js similarity index 100% rename from test/findKey/findKey.js rename to test2/findKey/findKey.js diff --git a/test2/findKey/findKey.test.js b/test2/findKey/findKey.test.js new file mode 100644 index 000000000..9c3e354a4 --- /dev/null +++ b/test2/findKey/findKey.test.js @@ -0,0 +1,16 @@ +const expect = require('expect'); +const findKey = require('./findKey.js'); + +test('Testing findKey', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof findKey === 'function').toBeTruthy(); + expect(findKey( + { + barney: { age: 36, active: true }, + fred: { age: 40, active: false }, + pebbles: { age: 1, active: true } + }, + o => o['active'] +)).toEqual('barney'); +}); diff --git a/test/findLast/findLast.js b/test2/findLast/findLast.js similarity index 100% rename from test/findLast/findLast.js rename to test2/findLast/findLast.js diff --git a/test2/findLast/findLast.test.js b/test2/findLast/findLast.test.js new file mode 100644 index 000000000..69e768dee --- /dev/null +++ b/test2/findLast/findLast.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const findLast = require('./findLast.js'); + +test('Testing findLast', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof findLast === 'function').toBeTruthy(); + expect(findLast([1, 2, 3, 4], n => n % 2 === 1)).toBe(3); +}); diff --git a/test/findLastIndex/findLastIndex.js b/test2/findLastIndex/findLastIndex.js similarity index 100% rename from test/findLastIndex/findLastIndex.js rename to test2/findLastIndex/findLastIndex.js diff --git a/test2/findLastIndex/findLastIndex.test.js b/test2/findLastIndex/findLastIndex.test.js new file mode 100644 index 000000000..2e1c57351 --- /dev/null +++ b/test2/findLastIndex/findLastIndex.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const findLastIndex = require('./findLastIndex.js'); + +test('Testing findLastIndex', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof findLastIndex === 'function').toBeTruthy(); + expect(findLastIndex([1, 2, 3, 4], n => n % 2 === 1)).toBe(2); +}); diff --git a/test/findLastKey/findLastKey.js b/test2/findLastKey/findLastKey.js similarity index 100% rename from test/findLastKey/findLastKey.js rename to test2/findLastKey/findLastKey.js diff --git a/test2/findLastKey/findLastKey.test.js b/test2/findLastKey/findLastKey.test.js new file mode 100644 index 000000000..bbaa493d5 --- /dev/null +++ b/test2/findLastKey/findLastKey.test.js @@ -0,0 +1,16 @@ +const expect = require('expect'); +const findLastKey = require('./findLastKey.js'); + +test('Testing findLastKey', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof findLastKey === 'function').toBeTruthy(); + expect(findLastKey( + { + barney: { age: 36, active: true }, + fred: { age: 40, active: false }, + pebbles: { age: 1, active: true } + }, + o => o['active'] +)).toBe('pebbles'); +}); diff --git a/test/flatten/flatten.js b/test2/flatten/flatten.js similarity index 100% rename from test/flatten/flatten.js rename to test2/flatten/flatten.js diff --git a/test2/flatten/flatten.test.js b/test2/flatten/flatten.test.js new file mode 100644 index 000000000..24da6650b --- /dev/null +++ b/test2/flatten/flatten.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const flatten = require('./flatten.js'); + +test('Testing flatten', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof flatten === 'function').toBeTruthy(); + expect(flatten([1, [2], 3, 4])).toEqual([1, 2, 3, 4]); + expect(flatten([1, [2, [3, [4, 5], 6], 7], 8], 2)).toEqual([1, 2, 3, [4, 5], 6, 7, 8]); +}); \ No newline at end of file diff --git a/test/flattenObject/flattenObject.js b/test2/flattenObject/flattenObject.js similarity index 100% rename from test/flattenObject/flattenObject.js rename to test2/flattenObject/flattenObject.js diff --git a/test2/flattenObject/flattenObject.test.js b/test2/flattenObject/flattenObject.test.js new file mode 100644 index 000000000..cc864ba37 --- /dev/null +++ b/test2/flattenObject/flattenObject.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const flattenObject = require('./flattenObject.js'); + +test('Testing flattenObject', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof flattenObject === 'function').toBeTruthy(); + expect(flattenObject({ a: { b: { c: 1 } }, d: 1 })).toEqual({ 'a.b.c': 1, d: 1 }); + 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.js b/test2/flip/flip.js similarity index 100% rename from test/flip/flip.js rename to test2/flip/flip.js diff --git a/test2/flip/flip.test.js b/test2/flip/flip.test.js new file mode 100644 index 000000000..6227b2f44 --- /dev/null +++ b/test2/flip/flip.test.js @@ -0,0 +1,13 @@ +const expect = require('expect'); +const flip = require('./flip.js'); + +test('Testing flip', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof flip === 'function').toBeTruthy(); + let a = { name: 'John Smith' }; + let b = {}; + const mergeFrom = flip(Object.assign); + let mergePerson = mergeFrom.bind(null, a); + expect(mergePerson(b)).toEqual(a); +}); diff --git a/test/forEachRight/forEachRight.js b/test2/forEachRight/forEachRight.js similarity index 100% rename from test/forEachRight/forEachRight.js rename to test2/forEachRight/forEachRight.js diff --git a/test2/forEachRight/forEachRight.test.js b/test2/forEachRight/forEachRight.test.js new file mode 100644 index 000000000..b64188386 --- /dev/null +++ b/test2/forEachRight/forEachRight.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const forEachRight = require('./forEachRight.js'); + +test('Testing forEachRight', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof forEachRight === 'function').toBeTruthy(); + let output = ''; + forEachRight([1, 2, 3, 4], val => output+=val); + expect(output).toBe('4321'); +}); diff --git a/test/forOwn/forOwn.js b/test2/forOwn/forOwn.js similarity index 100% rename from test/forOwn/forOwn.js rename to test2/forOwn/forOwn.js diff --git a/test2/forOwn/forOwn.test.js b/test2/forOwn/forOwn.test.js new file mode 100644 index 000000000..85553ad3f --- /dev/null +++ b/test2/forOwn/forOwn.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const forOwn = require('./forOwn.js'); + +test('Testing forOwn', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof forOwn === 'function').toBeTruthy(); + let output = []; + forOwn({ foo: 'bar', a: 1 }, v => output.push(v)); // 'bar', 1 + expect(output).toEqual(['bar', 1]); +}); diff --git a/test/forOwnRight/forOwnRight.js b/test2/forOwnRight/forOwnRight.js similarity index 100% rename from test/forOwnRight/forOwnRight.js rename to test2/forOwnRight/forOwnRight.js diff --git a/test2/forOwnRight/forOwnRight.test.js b/test2/forOwnRight/forOwnRight.test.js new file mode 100644 index 000000000..db6008220 --- /dev/null +++ b/test2/forOwnRight/forOwnRight.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const forOwnRight = require('./forOwnRight.js'); + +test('Testing forOwnRight', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof forOwnRight === 'function').toBeTruthy(); + let output = []; + forOwnRight({ foo: 'bar', a: 1 }, v => output.push(v)); // 'bar', 1 + expect(output).toEqual([1, 'bar']); +}); diff --git a/test/formatDuration/formatDuration.js b/test2/formatDuration/formatDuration.js similarity index 100% rename from test/formatDuration/formatDuration.js rename to test2/formatDuration/formatDuration.js diff --git a/test2/formatDuration/formatDuration.test.js b/test2/formatDuration/formatDuration.test.js new file mode 100644 index 000000000..ebe26a0bd --- /dev/null +++ b/test2/formatDuration/formatDuration.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const formatDuration = require('./formatDuration.js'); + +test('Testing formatDuration', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof formatDuration === 'function').toBeTruthy(); + expect(formatDuration(1001)).toBe('1 second, 1 millisecond'); + expect(formatDuration(34325055574)).toBe('397 days, 6 hours, 44 minutes, 15 seconds, 574 milliseconds'); +}); \ No newline at end of file diff --git a/test/fromCamelCase/fromCamelCase.js b/test2/fromCamelCase/fromCamelCase.js similarity index 100% rename from test/fromCamelCase/fromCamelCase.js rename to test2/fromCamelCase/fromCamelCase.js diff --git a/test2/fromCamelCase/fromCamelCase.test.js b/test2/fromCamelCase/fromCamelCase.test.js new file mode 100644 index 000000000..5ab939e12 --- /dev/null +++ b/test2/fromCamelCase/fromCamelCase.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const fromCamelCase = require('./fromCamelCase.js'); + +test('Testing fromCamelCase', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof fromCamelCase === 'function').toBeTruthy(); + expect(fromCamelCase('someDatabaseFieldName', ' ')).toBe('some database field name'); + expect(fromCamelCase('someLabelThatNeedsToBeCamelized', '-')).toBe('some-label-that-needs-to-be-camelized'); + expect(fromCamelCase('someJavascriptProperty', '_')).toBe('some_javascript_property'); +}); \ No newline at end of file diff --git a/test/functionName/functionName.js b/test2/functionName/functionName.js similarity index 100% rename from test/functionName/functionName.js rename to test2/functionName/functionName.js diff --git a/test2/functionName/functionName.test.js b/test2/functionName/functionName.test.js new file mode 100644 index 000000000..8d00a5278 --- /dev/null +++ b/test2/functionName/functionName.test.js @@ -0,0 +1,19 @@ +import expect from 'expect'; +let output = ''; +const console = {}; +console.debug = (x) => output = x; +// Override for testing +const functionName = fn => (console.debug(fn.name), fn); +test('Testing functionName', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof functionName === 'function').toBeTruthy(); + functionName(Math.max); + expect(output).toBe('max'); + function fun(x) {return x;} + functionName(fun); + expect(output).toBe('fun'); + const fn = x => x; + functionName(fn); + expect(output).toBe('fn'); +}); diff --git a/test/functions/functions.js b/test2/functions/functions.js similarity index 100% rename from test/functions/functions.js rename to test2/functions/functions.js diff --git a/test2/functions/functions.test.js b/test2/functions/functions.test.js new file mode 100644 index 000000000..c6f94fc8c --- /dev/null +++ b/test2/functions/functions.test.js @@ -0,0 +1,15 @@ +const expect = require('expect'); +const functions = require('./functions.js'); + +test('Testing functions', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof functions === 'function').toBeTruthy(); + function Foo() { + this.a = () => 1; + this.b = () => 2; + } + Foo.prototype.c = () => 3; + expect(functions(new Foo())).toEqual(['a', 'b']); + expect(functions(new Foo(), true)).toEqual(['a', 'b', 'c']); +}); diff --git a/test/gcd/gcd.js b/test2/gcd/gcd.js similarity index 100% rename from test/gcd/gcd.js rename to test2/gcd/gcd.js diff --git a/test2/gcd/gcd.test.js b/test2/gcd/gcd.test.js new file mode 100644 index 000000000..a96a20050 --- /dev/null +++ b/test2/gcd/gcd.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const gcd = require('./gcd.js'); + +test('Testing gcd', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof gcd === 'function').toBeTruthy(); + expect(gcd(8, 36)).toBe(4); + expect(gcd(...[12, 8, 32])).toEqual(4); +}); \ No newline at end of file diff --git a/test/geometricProgression/geometricProgression.js b/test2/geometricProgression/geometricProgression.js similarity index 100% rename from test/geometricProgression/geometricProgression.js rename to test2/geometricProgression/geometricProgression.js diff --git a/test2/geometricProgression/geometricProgression.test.js b/test2/geometricProgression/geometricProgression.test.js new file mode 100644 index 000000000..d1cd39d4c --- /dev/null +++ b/test2/geometricProgression/geometricProgression.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const geometricProgression = require('./geometricProgression.js'); + +test('Testing geometricProgression', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof geometricProgression === 'function').toBeTruthy(); + expect(geometricProgression(256)).toEqual([1, 2, 4, 8, 16, 32, 64, 128, 256]); + expect(geometricProgression(256, 3)).toEqual([3, 6, 12, 24, 48, 96, 192]); + expect(geometricProgression(256, 1, 4)).toEqual([1, 4, 16, 64, 256]); +}); \ No newline at end of file diff --git a/test/get/get.js b/test2/get/get.js similarity index 100% rename from test/get/get.js rename to test2/get/get.js diff --git a/test2/get/get.test.js b/test2/get/get.test.js new file mode 100644 index 000000000..358f50b85 --- /dev/null +++ b/test2/get/get.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const get = require('./get.js'); + +test('Testing get', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof get === 'function').toBeTruthy(); + const obj = { selector: { to: { val: 'val to get' } } }; + expect(get(obj, 'selector.to.val')).toEqual(['val to get']); +}); diff --git a/test/getColonTimeFromDate/getColonTimeFromDate.js b/test2/getColonTimeFromDate/getColonTimeFromDate.js similarity index 100% rename from test/getColonTimeFromDate/getColonTimeFromDate.js rename to test2/getColonTimeFromDate/getColonTimeFromDate.js diff --git a/test2/getColonTimeFromDate/getColonTimeFromDate.test.js b/test2/getColonTimeFromDate/getColonTimeFromDate.test.js new file mode 100644 index 000000000..6336f0a1e --- /dev/null +++ b/test2/getColonTimeFromDate/getColonTimeFromDate.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const getColonTimeFromDate = require('./getColonTimeFromDate.js'); + +test('Testing getColonTimeFromDate', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof getColonTimeFromDate === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/getDaysDiffBetweenDates/getDaysDiffBetweenDates.js b/test2/getDaysDiffBetweenDates/getDaysDiffBetweenDates.js similarity index 100% rename from test/getDaysDiffBetweenDates/getDaysDiffBetweenDates.js rename to test2/getDaysDiffBetweenDates/getDaysDiffBetweenDates.js diff --git a/test2/getDaysDiffBetweenDates/getDaysDiffBetweenDates.test.js b/test2/getDaysDiffBetweenDates/getDaysDiffBetweenDates.test.js new file mode 100644 index 000000000..c3c9ab2e0 --- /dev/null +++ b/test2/getDaysDiffBetweenDates/getDaysDiffBetweenDates.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const getDaysDiffBetweenDates = require('./getDaysDiffBetweenDates.js'); + +test('Testing getDaysDiffBetweenDates', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof getDaysDiffBetweenDates === 'function').toBeTruthy(); + expect(getDaysDiffBetweenDates(new Date('2017-12-13'), new Date('2017-12-22'))).toBe(9); +}); \ No newline at end of file diff --git a/test/getMeridiemSuffixOfInteger/getMeridiemSuffixOfInteger.js b/test2/getMeridiemSuffixOfInteger/getMeridiemSuffixOfInteger.js similarity index 100% rename from test/getMeridiemSuffixOfInteger/getMeridiemSuffixOfInteger.js rename to test2/getMeridiemSuffixOfInteger/getMeridiemSuffixOfInteger.js diff --git a/test2/getMeridiemSuffixOfInteger/getMeridiemSuffixOfInteger.test.js b/test2/getMeridiemSuffixOfInteger/getMeridiemSuffixOfInteger.test.js new file mode 100644 index 000000000..c265282ef --- /dev/null +++ b/test2/getMeridiemSuffixOfInteger/getMeridiemSuffixOfInteger.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const getMeridiemSuffixOfInteger = require('./getMeridiemSuffixOfInteger.js'); + +test('Testing getMeridiemSuffixOfInteger', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof getMeridiemSuffixOfInteger === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/getScrollPosition/getScrollPosition.js b/test2/getScrollPosition/getScrollPosition.js similarity index 100% rename from test/getScrollPosition/getScrollPosition.js rename to test2/getScrollPosition/getScrollPosition.js diff --git a/test2/getScrollPosition/getScrollPosition.test.js b/test2/getScrollPosition/getScrollPosition.test.js new file mode 100644 index 000000000..ca75aec52 --- /dev/null +++ b/test2/getScrollPosition/getScrollPosition.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const getScrollPosition = require('./getScrollPosition.js'); + +test('Testing getScrollPosition', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof getScrollPosition === 'function').toBeTruthy(); +}); diff --git a/test/getStyle/getStyle.js b/test2/getStyle/getStyle.js similarity index 100% rename from test/getStyle/getStyle.js rename to test2/getStyle/getStyle.js diff --git a/test2/getStyle/getStyle.test.js b/test2/getStyle/getStyle.test.js new file mode 100644 index 000000000..1d1fc4e47 --- /dev/null +++ b/test2/getStyle/getStyle.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const getStyle = require('./getStyle.js'); + +test('Testing getStyle', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof getStyle === 'function').toBeTruthy(); +}); diff --git a/test/getType/getType.js b/test2/getType/getType.js similarity index 100% rename from test/getType/getType.js rename to test2/getType/getType.js diff --git a/test2/getType/getType.test.js b/test2/getType/getType.test.js new file mode 100644 index 000000000..4e7b38e4b --- /dev/null +++ b/test2/getType/getType.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const getType = require('./getType.js'); + +test('Testing getType', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof getType === 'function').toBeTruthy(); + expect(getType(new Set([1, 2, 3]))).toBe('set'); +}); \ No newline at end of file diff --git a/test/getURLParameters/getURLParameters.js b/test2/getURLParameters/getURLParameters.js similarity index 100% rename from test/getURLParameters/getURLParameters.js rename to test2/getURLParameters/getURLParameters.js diff --git a/test2/getURLParameters/getURLParameters.test.js b/test2/getURLParameters/getURLParameters.test.js new file mode 100644 index 000000000..4b93ceca6 --- /dev/null +++ b/test2/getURLParameters/getURLParameters.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const getURLParameters = require('./getURLParameters.js'); + +test('Testing getURLParameters', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof getURLParameters === 'function').toBeTruthy(); + expect(getURLParameters('http://url.com/page?name=Adam&surname=Smith')).toEqual({name: 'Adam', surname: 'Smith'}); +}); \ No newline at end of file diff --git a/test/groupBy/groupBy.js b/test3/groupBy/groupBy.js similarity index 100% rename from test/groupBy/groupBy.js rename to test3/groupBy/groupBy.js diff --git a/test3/groupBy/groupBy.test.js b/test3/groupBy/groupBy.test.js new file mode 100644 index 000000000..a639ba073 --- /dev/null +++ b/test3/groupBy/groupBy.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const groupBy = require('./groupBy.js'); + +test('Testing groupBy', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof groupBy === 'function').toBeTruthy(); + expect(groupBy([6.1, 4.2, 6.3], Math.floor)).toEqual({4: [4.2], 6: [6.1, 6.3]}); + expect(groupBy(['one', 'two', 'three'], 'length')).toEqual({3: ['one', 'two'], 5: ['three']}); +}); \ No newline at end of file diff --git a/test/hammingDistance/hammingDistance.js b/test3/hammingDistance/hammingDistance.js similarity index 100% rename from test/hammingDistance/hammingDistance.js rename to test3/hammingDistance/hammingDistance.js diff --git a/test3/hammingDistance/hammingDistance.test.js b/test3/hammingDistance/hammingDistance.test.js new file mode 100644 index 000000000..8ec3fef99 --- /dev/null +++ b/test3/hammingDistance/hammingDistance.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const hammingDistance = require('./hammingDistance.js'); + +test('Testing hammingDistance', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof hammingDistance === 'function').toBeTruthy(); + expect(hammingDistance(2, 3)).toBe(1); +}); \ No newline at end of file diff --git a/test/hasClass/hasClass.js b/test3/hasClass/hasClass.js similarity index 100% rename from test/hasClass/hasClass.js rename to test3/hasClass/hasClass.js diff --git a/test3/hasClass/hasClass.test.js b/test3/hasClass/hasClass.test.js new file mode 100644 index 000000000..5b04c1444 --- /dev/null +++ b/test3/hasClass/hasClass.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const hasClass = require('./hasClass.js'); + +test('Testing hasClass', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof hasClass === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/hasFlags/hasFlags.js b/test3/hasFlags/hasFlags.js similarity index 100% rename from test/hasFlags/hasFlags.js rename to test3/hasFlags/hasFlags.js diff --git a/test3/hasFlags/hasFlags.test.js b/test3/hasFlags/hasFlags.test.js new file mode 100644 index 000000000..50a922aae --- /dev/null +++ b/test3/hasFlags/hasFlags.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const hasFlags = require('./hasFlags.js'); + +test('Testing hasFlags', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof hasFlags === 'function').toBeTruthy(); +}); diff --git a/test/hashBrowser/hashBrowser.js b/test3/hashBrowser/hashBrowser.js similarity index 100% rename from test/hashBrowser/hashBrowser.js rename to test3/hashBrowser/hashBrowser.js diff --git a/test3/hashBrowser/hashBrowser.test.js b/test3/hashBrowser/hashBrowser.test.js new file mode 100644 index 000000000..103e968b1 --- /dev/null +++ b/test3/hashBrowser/hashBrowser.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const hashBrowser = require('./hashBrowser.js'); + +test('Testing hashBrowser', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof hashBrowser === 'function').toBeTruthy(); +}); diff --git a/test/hashNode/hashNode.js b/test3/hashNode/hashNode.js similarity index 100% rename from test/hashNode/hashNode.js rename to test3/hashNode/hashNode.js diff --git a/test3/hashNode/hashNode.test.js b/test3/hashNode/hashNode.test.js new file mode 100644 index 000000000..b594baf55 --- /dev/null +++ b/test3/hashNode/hashNode.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const hashNode = require('./hashNode.js'); + +test('Testing hashNode', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof hashNode === 'function').toBeTruthy(); + 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.js b/test3/head/head.js similarity index 100% rename from test/head/head.js rename to test3/head/head.js diff --git a/test3/head/head.test.js b/test3/head/head.test.js new file mode 100644 index 000000000..cb300bfcf --- /dev/null +++ b/test3/head/head.test.js @@ -0,0 +1,20 @@ +const expect = require('expect'); +const head = require('./head.js'); + +test('Testing head', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof head === 'function').toBeTruthy(); + expect(head({ a: 1234}) === undefined).toBeTruthy(); + expect(head([1, 2, 3])).toBe(1); + expect(head({ 0: false})).toBe(false); + expect(head('String')).toBe('S'); + expect(() => head(null)).toThrow(); + expect(() => head(undefined)).toThrow(); + 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(); + expect((end - start) < 2000).toBeTruthy(); +}); \ No newline at end of file diff --git a/test/hexToRGB/hexToRGB.js b/test3/hexToRGB/hexToRGB.js similarity index 100% rename from test/hexToRGB/hexToRGB.js rename to test3/hexToRGB/hexToRGB.js diff --git a/test3/hexToRGB/hexToRGB.test.js b/test3/hexToRGB/hexToRGB.test.js new file mode 100644 index 000000000..20e0bdf32 --- /dev/null +++ b/test3/hexToRGB/hexToRGB.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const hexToRGB = require('./hexToRGB.js'); + +test('Testing hexToRGB', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof hexToRGB === 'function').toBeTruthy(); + expect(hexToRGB('#27ae60ff')).toBe('rgba(39, 174, 96, 255)'); + expect(hexToRGB('27ae60')).toBe('rgb(39, 174, 96)'); + expect(hexToRGB('#fff')).toBe('rgb(255, 255, 255)'); +}); \ No newline at end of file diff --git a/test/hide/hide.js b/test3/hide/hide.js similarity index 100% rename from test/hide/hide.js rename to test3/hide/hide.js diff --git a/test3/hide/hide.test.js b/test3/hide/hide.test.js new file mode 100644 index 000000000..f011daf95 --- /dev/null +++ b/test3/hide/hide.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const hide = require('./hide.js'); + +test('Testing hide', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof hide === 'function').toBeTruthy(); +}); diff --git a/test/howManyTimes/howManyTimes.js b/test3/howManyTimes/howManyTimes.js similarity index 100% rename from test/howManyTimes/howManyTimes.js rename to test3/howManyTimes/howManyTimes.js diff --git a/test3/howManyTimes/howManyTimes.test.js b/test3/howManyTimes/howManyTimes.test.js new file mode 100644 index 000000000..daacb5c6d --- /dev/null +++ b/test3/howManyTimes/howManyTimes.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const howManyTimes = require('./howManyTimes.js'); + +test('Testing howManyTimes', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof howManyTimes === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/httpDelete/httpDelete.js b/test3/httpDelete/httpDelete.js similarity index 100% rename from test/httpDelete/httpDelete.js rename to test3/httpDelete/httpDelete.js diff --git a/test3/httpDelete/httpDelete.test.js b/test3/httpDelete/httpDelete.test.js new file mode 100644 index 000000000..afc68db92 --- /dev/null +++ b/test3/httpDelete/httpDelete.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const httpDelete = require('./httpDelete.js'); + +test('Testing httpDelete', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof httpDelete === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/httpGet/httpGet.js b/test3/httpGet/httpGet.js similarity index 100% rename from test/httpGet/httpGet.js rename to test3/httpGet/httpGet.js diff --git a/test/httpGet/httpGet.test.js b/test3/httpGet/httpGet.test.js similarity index 97% rename from test/httpGet/httpGet.test.js rename to test3/httpGet/httpGet.test.js index a23ff2131..813289a70 100644 --- a/test/httpGet/httpGet.test.js +++ b/test3/httpGet/httpGet.test.js @@ -1,6 +1,4 @@ -const test = require('tape'); -//const httpGet = require('./httpGet.js'); -// Override +const expect = require("expect"); const httpGet = (url, callback, err = console.error) => { const request = new XMLHttpRequest(); request.open('GET', url, true); @@ -9,26 +7,20 @@ const httpGet = (url, callback, err = console.error) => { request.send(); }; -test('Testing httpGet', (t) => { +test('Testing httpGet', () => { //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'); + expect(typeof httpGet === 'function').toBeTruthy(); httpGet('https://jsonplaceholder.typicode.com/posts/1', response => { - t.deepEqual(JSON.parse(response), { + expect(JSON.parse(response)).toEqual({ 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(); }); // Custom implementation of XMLHttpRequest for the requirements of this snippet. // Based on https://github.com/driverdan/node-XMLHttpRequest diff --git a/test/httpPost/httpPost.js b/test3/httpPost/httpPost.js similarity index 100% rename from test/httpPost/httpPost.js rename to test3/httpPost/httpPost.js diff --git a/test/httpPost/httpPost.test.js b/test3/httpPost/httpPost.test.js similarity index 97% rename from test/httpPost/httpPost.test.js rename to test3/httpPost/httpPost.test.js index 05fc7f421..e3367ba47 100644 --- a/test/httpPost/httpPost.test.js +++ b/test3/httpPost/httpPost.test.js @@ -1,5 +1,4 @@ -const test = require('tape'); -//const httpPost = require('./httpPost.js'); +const expect = require("expect"); const httpPost = (url, data, callback, err = console.error) => { const request = new XMLHttpRequest(); request.open('POST', url, true); @@ -8,23 +7,18 @@ const httpPost = (url, data, callback, err = console.error) => { request.onerror = () => err(request); request.send(data); }; -test('Testing httpPost', (t) => { +test('Testing httpPost', () => { //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'); + expect(typeof httpPost === 'function').toBeTruthy(); 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'); + expect(JSON.parse(response).id).toEqual(101); }); - //t.deepEqual(httpPost(args..), 'Expected'); - //t.equal(httpPost(args..), 'Expected'); - //t.false(httpPost(args..), 'Expected'); - //t.throws(httpPost(args..), 'Expected'); - t.end(); }); // Custom implementation of XMLHttpRequest for the requirements of this snippet. diff --git a/test/httpPut/httpPut.js b/test3/httpPut/httpPut.js similarity index 100% rename from test/httpPut/httpPut.js rename to test3/httpPut/httpPut.js diff --git a/test3/httpPut/httpPut.test.js b/test3/httpPut/httpPut.test.js new file mode 100644 index 000000000..57cc17100 --- /dev/null +++ b/test3/httpPut/httpPut.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const httpPut = require('./httpPut.js'); + +test('Testing httpPut', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof httpPut === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/httpsRedirect/httpsRedirect.js b/test3/httpsRedirect/httpsRedirect.js similarity index 100% rename from test/httpsRedirect/httpsRedirect.js rename to test3/httpsRedirect/httpsRedirect.js diff --git a/test3/httpsRedirect/httpsRedirect.test.js b/test3/httpsRedirect/httpsRedirect.test.js new file mode 100644 index 000000000..dcea1d1e6 --- /dev/null +++ b/test3/httpsRedirect/httpsRedirect.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const httpsRedirect = require('./httpsRedirect.js'); + +test('Testing httpsRedirect', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof httpsRedirect === 'function').toBeTruthy(); +}); diff --git a/test/hz/hz.js b/test3/hz/hz.js similarity index 100% rename from test/hz/hz.js rename to test3/hz/hz.js diff --git a/test3/hz/hz.test.js b/test3/hz/hz.test.js new file mode 100644 index 000000000..0181386c2 --- /dev/null +++ b/test3/hz/hz.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const hz = require('./hz.js'); + +test('Testing hz', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof hz === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/inRange/inRange.js b/test3/inRange/inRange.js similarity index 100% rename from test/inRange/inRange.js rename to test3/inRange/inRange.js diff --git a/test3/inRange/inRange.test.js b/test3/inRange/inRange.test.js new file mode 100644 index 000000000..dbaa8e096 --- /dev/null +++ b/test3/inRange/inRange.test.js @@ -0,0 +1,12 @@ +const expect = require('expect'); +const inRange = require('./inRange.js'); + +test('Testing inRange', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof inRange === 'function').toBeTruthy(); + expect(inRange(3, 2, 5)).toBe(true); + expect(inRange(3, 4)).toBe(true); + expect(inRange(2, 3, 5)).toBe(false); + expect(inRange(3, 2)).toBe(false); +}); \ No newline at end of file diff --git a/test/indexOfAll/indexOfAll.js b/test3/indexOfAll/indexOfAll.js similarity index 100% rename from test/indexOfAll/indexOfAll.js rename to test3/indexOfAll/indexOfAll.js diff --git a/test3/indexOfAll/indexOfAll.test.js b/test3/indexOfAll/indexOfAll.test.js new file mode 100644 index 000000000..792cd1f16 --- /dev/null +++ b/test3/indexOfAll/indexOfAll.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const indexOfAll = require('./indexOfAll.js'); + +test('Testing indexOfAll', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof indexOfAll === 'function').toBeTruthy(); + expect(indexOfAll([1, 2, 3, 1, 2, 3], 1)).toEqual([0,3]); + expect(indexOfAll([1, 2, 3], 4)).toEqual([]); +}); \ No newline at end of file diff --git a/test/initial/initial.js b/test3/initial/initial.js similarity index 100% rename from test/initial/initial.js rename to test3/initial/initial.js diff --git a/test3/initial/initial.test.js b/test3/initial/initial.test.js new file mode 100644 index 000000000..c4febca6a --- /dev/null +++ b/test3/initial/initial.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const initial = require('./initial.js'); + +test('Testing initial', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof initial === 'function').toBeTruthy(); + expect(initial([1, 2, 3])).toEqual([1, 2]); +}); \ No newline at end of file diff --git a/test/initialize2DArray/initialize2DArray.js b/test3/initialize2DArray/initialize2DArray.js similarity index 100% rename from test/initialize2DArray/initialize2DArray.js rename to test3/initialize2DArray/initialize2DArray.js diff --git a/test3/initialize2DArray/initialize2DArray.test.js b/test3/initialize2DArray/initialize2DArray.test.js new file mode 100644 index 000000000..c8bbb69cb --- /dev/null +++ b/test3/initialize2DArray/initialize2DArray.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const initialize2DArray = require('./initialize2DArray.js'); + +test('Testing initialize2DArray', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof initialize2DArray === 'function').toBeTruthy(); + expect(initialize2DArray(2, 2, 0)).toEqual([[0,0], [0,0]]); +}); \ No newline at end of file diff --git a/test/initializeArrayWithRange/initializeArrayWithRange.js b/test3/initializeArrayWithRange/initializeArrayWithRange.js similarity index 100% rename from test/initializeArrayWithRange/initializeArrayWithRange.js rename to test3/initializeArrayWithRange/initializeArrayWithRange.js diff --git a/test3/initializeArrayWithRange/initializeArrayWithRange.test.js b/test3/initializeArrayWithRange/initializeArrayWithRange.test.js new file mode 100644 index 000000000..e232928c2 --- /dev/null +++ b/test3/initializeArrayWithRange/initializeArrayWithRange.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const initializeArrayWithRange = require('./initializeArrayWithRange.js'); + +test('Testing initializeArrayWithRange', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof initializeArrayWithRange === 'function').toBeTruthy(); + expect(initializeArrayWithRange(5)).toEqual([0, 1, 2, 3, 4, 5]); +}); \ No newline at end of file diff --git a/test/initializeArrayWithRangeRight/initializeArrayWithRangeRight.js b/test3/initializeArrayWithRangeRight/initializeArrayWithRangeRight.js similarity index 100% rename from test/initializeArrayWithRangeRight/initializeArrayWithRangeRight.js rename to test3/initializeArrayWithRangeRight/initializeArrayWithRangeRight.js diff --git a/test3/initializeArrayWithRangeRight/initializeArrayWithRangeRight.test.js b/test3/initializeArrayWithRangeRight/initializeArrayWithRangeRight.test.js new file mode 100644 index 000000000..462cf1c8b --- /dev/null +++ b/test3/initializeArrayWithRangeRight/initializeArrayWithRangeRight.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const initializeArrayWithRangeRight = require('./initializeArrayWithRangeRight.js'); + +test('Testing initializeArrayWithRangeRight', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof initializeArrayWithRangeRight === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/initializeArrayWithValues/initializeArrayWithValues.js b/test3/initializeArrayWithValues/initializeArrayWithValues.js similarity index 100% rename from test/initializeArrayWithValues/initializeArrayWithValues.js rename to test3/initializeArrayWithValues/initializeArrayWithValues.js diff --git a/test3/initializeArrayWithValues/initializeArrayWithValues.test.js b/test3/initializeArrayWithValues/initializeArrayWithValues.test.js new file mode 100644 index 000000000..c7b4bbd2f --- /dev/null +++ b/test3/initializeArrayWithValues/initializeArrayWithValues.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const initializeArrayWithValues = require('./initializeArrayWithValues.js'); + +test('Testing initializeArrayWithValues', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof initializeArrayWithValues === 'function').toBeTruthy(); + expect(initializeArrayWithValues(5, 2)).toEqual([2, 2, 2, 2, 2]); +}); \ No newline at end of file diff --git a/test/initializeNDArray/initializeNDArray.js b/test3/initializeNDArray/initializeNDArray.js similarity index 100% rename from test/initializeNDArray/initializeNDArray.js rename to test3/initializeNDArray/initializeNDArray.js diff --git a/test3/initializeNDArray/initializeNDArray.test.js b/test3/initializeNDArray/initializeNDArray.test.js new file mode 100644 index 000000000..c2557c2ce --- /dev/null +++ b/test3/initializeNDArray/initializeNDArray.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const initializeNDArray = require('./initializeNDArray.js'); + +test('Testing initializeNDArray', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof initializeNDArray === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/intersection/intersection.js b/test3/intersection/intersection.js similarity index 100% rename from test/intersection/intersection.js rename to test3/intersection/intersection.js diff --git a/test3/intersection/intersection.test.js b/test3/intersection/intersection.test.js new file mode 100644 index 000000000..10377e033 --- /dev/null +++ b/test3/intersection/intersection.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const intersection = require('./intersection.js'); + +test('Testing intersection', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof intersection === 'function').toBeTruthy(); + expect(intersection([1, 2, 3], [4, 3, 2])).toEqual([2, 3]); +}); \ No newline at end of file diff --git a/test/intersectionBy/intersectionBy.js b/test3/intersectionBy/intersectionBy.js similarity index 100% rename from test/intersectionBy/intersectionBy.js rename to test3/intersectionBy/intersectionBy.js diff --git a/test3/intersectionBy/intersectionBy.test.js b/test3/intersectionBy/intersectionBy.test.js new file mode 100644 index 000000000..903e522ed --- /dev/null +++ b/test3/intersectionBy/intersectionBy.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const intersectionBy = require('./intersectionBy.js'); + +test('Testing intersectionBy', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof intersectionBy === 'function').toBeTruthy(); + expect(intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor)).toEqual([2.1]); +}); diff --git a/test/intersectionWith/intersectionWith.js b/test3/intersectionWith/intersectionWith.js similarity index 100% rename from test/intersectionWith/intersectionWith.js rename to test3/intersectionWith/intersectionWith.js diff --git a/test3/intersectionWith/intersectionWith.test.js b/test3/intersectionWith/intersectionWith.test.js new file mode 100644 index 000000000..bf2c4a091 --- /dev/null +++ b/test3/intersectionWith/intersectionWith.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const intersectionWith = require('./intersectionWith.js'); + +test('Testing intersectionWith', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof intersectionWith === 'function').toBeTruthy(); + 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.js b/test3/invertKeyValues/invertKeyValues.js similarity index 100% rename from test/invertKeyValues/invertKeyValues.js rename to test3/invertKeyValues/invertKeyValues.js diff --git a/test3/invertKeyValues/invertKeyValues.test.js b/test3/invertKeyValues/invertKeyValues.test.js new file mode 100644 index 000000000..02a21f85e --- /dev/null +++ b/test3/invertKeyValues/invertKeyValues.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const invertKeyValues = require('./invertKeyValues.js'); + +test('Testing invertKeyValues', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof invertKeyValues === 'function').toBeTruthy(); + expect(invertKeyValues({ a: 1, b: 2, c: 1 })).toEqual({ 1: [ 'a', 'c' ], 2: [ 'b' ] }); + expect(invertKeyValues({ a: 1, b: 2, c: 1 }, value => 'group' + value)).toEqual({ group1: [ 'a', 'c' ], group2: [ 'b' ] }); +}); \ No newline at end of file diff --git a/test/is/is.js b/test3/is/is.js similarity index 100% rename from test/is/is.js rename to test3/is/is.js diff --git a/test3/is/is.test.js b/test3/is/is.test.js new file mode 100644 index 000000000..b39b90d11 --- /dev/null +++ b/test3/is/is.test.js @@ -0,0 +1,24 @@ +const expect = require('expect'); +const is = require('./is.js'); + +test('Testing is', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof is === 'function').toBeTruthy(); + expect(is(Array, [1])).toBeTruthy(); + expect(is(Array, [])).toBeTruthy(); + expect(is(Array, {})).toBeFalsy(); + expect(is(Object, {})).toBeTruthy(); + expect(is(Map, new Map())).toBeTruthy(); + expect(is(RegExp, /./g)).toBeTruthy(); + expect(is(Set, new Set())).toBeTruthy(); + expect(is(WeakMap, new WeakMap())).toBeTruthy(); + expect(is(WeakSet, new WeakSet())).toBeTruthy(); + expect(is(String, '')).toBeTruthy(); + expect(is(String, new String(''))).toBeTruthy(); + expect(is(Number, 1)).toBeTruthy(); + expect(is(Number, new Number('10'))).toBeTruthy(); + expect(is(Boolean, false)).toBeTruthy(); + expect(is(Boolean, new Boolean(false))).toBeTruthy(); + expect(is(Function, () => null)).toBeTruthy(); +}); diff --git a/test/isAbsoluteURL/isAbsoluteURL.js b/test3/isAbsoluteURL/isAbsoluteURL.js similarity index 100% rename from test/isAbsoluteURL/isAbsoluteURL.js rename to test3/isAbsoluteURL/isAbsoluteURL.js diff --git a/test3/isAbsoluteURL/isAbsoluteURL.test.js b/test3/isAbsoluteURL/isAbsoluteURL.test.js new file mode 100644 index 000000000..085b7cf3c --- /dev/null +++ b/test3/isAbsoluteURL/isAbsoluteURL.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const isAbsoluteURL = require('./isAbsoluteURL.js'); + +test('Testing isAbsoluteURL', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isAbsoluteURL === 'function').toBeTruthy(); + expect(isAbsoluteURL('https://google.com')).toBe(true); + expect(isAbsoluteURL('ftp://www.myserver.net')).toBe(true); + expect(isAbsoluteURL('/foo/bar')).toBe(false); +}); \ No newline at end of file diff --git a/test/isAnagram/isAnagram.js b/test3/isAnagram/isAnagram.js similarity index 100% rename from test/isAnagram/isAnagram.js rename to test3/isAnagram/isAnagram.js diff --git a/test3/isAnagram/isAnagram.test.js b/test3/isAnagram/isAnagram.test.js new file mode 100644 index 000000000..0508183a8 --- /dev/null +++ b/test3/isAnagram/isAnagram.test.js @@ -0,0 +1,12 @@ +const expect = require('expect'); +const isAnagram = require('./isAnagram.js'); + +test('Testing isAnagram', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isAnagram === 'function').toBeTruthy(); + expect(isAnagram('iceman', 'cinema')).toBeTruthy(); + expect(isAnagram('rail safety', 'fairy tales')).toBeTruthy(); + expect(isAnagram('roast beef', 'eat for BSE')).toBeTruthy(); + expect(isAnagram('Regera Dowdy', 'E. G. Deadworry')).toBeTruthy(); +}); diff --git a/test/isArmstrongNumber/isArmstrongNumber.js b/test3/isArmstrongNumber/isArmstrongNumber.js similarity index 100% rename from test/isArmstrongNumber/isArmstrongNumber.js rename to test3/isArmstrongNumber/isArmstrongNumber.js diff --git a/test3/isArmstrongNumber/isArmstrongNumber.test.js b/test3/isArmstrongNumber/isArmstrongNumber.test.js new file mode 100644 index 000000000..07c78dd06 --- /dev/null +++ b/test3/isArmstrongNumber/isArmstrongNumber.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const isArmstrongNumber = require('./isArmstrongNumber.js'); + +test('Testing isArmstrongNumber', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isArmstrongNumber === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/isArray/isArray.js b/test3/isArray/isArray.js similarity index 100% rename from test/isArray/isArray.js rename to test3/isArray/isArray.js diff --git a/test3/isArray/isArray.test.js b/test3/isArray/isArray.test.js new file mode 100644 index 000000000..21416f848 --- /dev/null +++ b/test3/isArray/isArray.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const isArray = require('./isArray.js'); + +test('Testing isArray', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isArray === 'function').toBeTruthy(); + expect(isArray([1])).toBe(true); + expect(isArray('array')).toBe(false); +}); \ No newline at end of file diff --git a/test/isArrayBuffer/isArrayBuffer.js b/test3/isArrayBuffer/isArrayBuffer.js similarity index 100% rename from test/isArrayBuffer/isArrayBuffer.js rename to test3/isArrayBuffer/isArrayBuffer.js diff --git a/test3/isArrayBuffer/isArrayBuffer.test.js b/test3/isArrayBuffer/isArrayBuffer.test.js new file mode 100644 index 000000000..3e9264b89 --- /dev/null +++ b/test3/isArrayBuffer/isArrayBuffer.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const isArrayBuffer = require('./isArrayBuffer.js'); + +test('Testing isArrayBuffer', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isArrayBuffer === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/isArrayLike/isArrayLike.js b/test3/isArrayLike/isArrayLike.js similarity index 100% rename from test/isArrayLike/isArrayLike.js rename to test3/isArrayLike/isArrayLike.js diff --git a/test3/isArrayLike/isArrayLike.test.js b/test3/isArrayLike/isArrayLike.test.js new file mode 100644 index 000000000..a11a11186 --- /dev/null +++ b/test3/isArrayLike/isArrayLike.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const isArrayLike = require('./isArrayLike.js'); + +test('Testing isArrayLike', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isArrayLike === 'function').toBeTruthy(); + expect(isArrayLike('abc')).toBe(true); + expect(isArrayLike([1,2,3])).toBe(true); + expect(isArrayLike(null)).toBe(false); +}); diff --git a/test/isBoolean/isBoolean.js b/test3/isBoolean/isBoolean.js similarity index 100% rename from test/isBoolean/isBoolean.js rename to test3/isBoolean/isBoolean.js diff --git a/test3/isBoolean/isBoolean.test.js b/test3/isBoolean/isBoolean.test.js new file mode 100644 index 000000000..f5b7ebefd --- /dev/null +++ b/test3/isBoolean/isBoolean.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const isBoolean = require('./isBoolean.js'); + +test('Testing isBoolean', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isBoolean === 'function').toBeTruthy(); + expect(isBoolean(null)).toBe(false); + expect(isBoolean(false)).toBe(true); +}); \ No newline at end of file diff --git a/test/isBrowser/isBrowser.js b/test3/isBrowser/isBrowser.js similarity index 100% rename from test/isBrowser/isBrowser.js rename to test3/isBrowser/isBrowser.js diff --git a/test3/isBrowser/isBrowser.test.js b/test3/isBrowser/isBrowser.test.js new file mode 100644 index 000000000..bb0a421d5 --- /dev/null +++ b/test3/isBrowser/isBrowser.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const isBrowser = require('./isBrowser.js'); + +test('Testing isBrowser', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isBrowser === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/isBrowserTabFocused/isBrowserTabFocused.js b/test3/isBrowserTabFocused/isBrowserTabFocused.js similarity index 100% rename from test/isBrowserTabFocused/isBrowserTabFocused.js rename to test3/isBrowserTabFocused/isBrowserTabFocused.js diff --git a/test3/isBrowserTabFocused/isBrowserTabFocused.test.js b/test3/isBrowserTabFocused/isBrowserTabFocused.test.js new file mode 100644 index 000000000..54989d858 --- /dev/null +++ b/test3/isBrowserTabFocused/isBrowserTabFocused.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const isBrowserTabFocused = require('./isBrowserTabFocused.js'); + +test('Testing isBrowserTabFocused', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isBrowserTabFocused === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/isDivisible/isDivisible.js b/test3/isDivisible/isDivisible.js similarity index 100% rename from test/isDivisible/isDivisible.js rename to test3/isDivisible/isDivisible.js diff --git a/test3/isDivisible/isDivisible.test.js b/test3/isDivisible/isDivisible.test.js new file mode 100644 index 000000000..637d6b4d5 --- /dev/null +++ b/test3/isDivisible/isDivisible.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const isDivisible = require('./isDivisible.js'); + +test('Testing isDivisible', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isDivisible === 'function').toBeTruthy(); + expect(isDivisible(6, 3)).toBe(true); +}); \ No newline at end of file diff --git a/test/isEmpty/isEmpty.js b/test3/isEmpty/isEmpty.js similarity index 100% rename from test/isEmpty/isEmpty.js rename to test3/isEmpty/isEmpty.js diff --git a/test3/isEmpty/isEmpty.test.js b/test3/isEmpty/isEmpty.test.js new file mode 100644 index 000000000..70806b461 --- /dev/null +++ b/test3/isEmpty/isEmpty.test.js @@ -0,0 +1,18 @@ +const expect = require('expect'); +const isEmpty = require('./isEmpty.js'); + +test('Testing isEmpty', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isEmpty === 'function').toBeTruthy(); + expect(isEmpty(new Map())).toBe(true); + expect(isEmpty(new Set())).toBe(true); + expect(isEmpty([])).toBe(true); + expect(isEmpty({})).toBe(true); + expect(isEmpty('')).toBe(true); + expect(isEmpty([1, 2])).toBe(false); + expect(isEmpty({ a: 1, b: 2 })).toBe(false); + expect(isEmpty('text')).toBe(false); + expect(isEmpty(123)).toBe(true); + expect(isEmpty(true)).toBe(true); +}); diff --git a/test/isEven/isEven.js b/test3/isEven/isEven.js similarity index 100% rename from test/isEven/isEven.js rename to test3/isEven/isEven.js diff --git a/test3/isEven/isEven.test.js b/test3/isEven/isEven.test.js new file mode 100644 index 000000000..1babab815 --- /dev/null +++ b/test3/isEven/isEven.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const isEven = require('./isEven.js'); + +test('Testing isEven', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isEven === 'function').toBeTruthy(); + expect(isEven(4)).toBe(true); + expect(isEven(5)).toBeFalsy(); +}); \ No newline at end of file diff --git a/test/isFunction/isFunction.js b/test3/isFunction/isFunction.js similarity index 100% rename from test/isFunction/isFunction.js rename to test3/isFunction/isFunction.js diff --git a/test3/isFunction/isFunction.test.js b/test3/isFunction/isFunction.test.js new file mode 100644 index 000000000..97c8b64f5 --- /dev/null +++ b/test3/isFunction/isFunction.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const isFunction = require('./isFunction.js'); + +test('Testing isFunction', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isFunction === 'function').toBeTruthy(); + expect(isFunction(x => x)).toBe(true); + expect(isFunction('x')).toBe(false); +}); \ No newline at end of file diff --git a/test/isLowerCase/isLowerCase.js b/test3/isLowerCase/isLowerCase.js similarity index 100% rename from test/isLowerCase/isLowerCase.js rename to test3/isLowerCase/isLowerCase.js diff --git a/test3/isLowerCase/isLowerCase.test.js b/test3/isLowerCase/isLowerCase.test.js new file mode 100644 index 000000000..624400811 --- /dev/null +++ b/test3/isLowerCase/isLowerCase.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const isLowerCase = require('./isLowerCase.js'); + +test('Testing isLowerCase', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isLowerCase === 'function').toBeTruthy(); + expect(isLowerCase('abc')).toBe(true); + expect(isLowerCase('a3@$')).toBe(true); + expect(isLowerCase('A3@$')).toBe(false); +}); \ No newline at end of file diff --git a/test/isMap/isMap.js b/test3/isMap/isMap.js similarity index 100% rename from test/isMap/isMap.js rename to test3/isMap/isMap.js diff --git a/test3/isMap/isMap.test.js b/test3/isMap/isMap.test.js new file mode 100644 index 000000000..27a16b4a6 --- /dev/null +++ b/test3/isMap/isMap.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const isMap = require('./isMap.js'); + +test('Testing isMap', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isMap === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/isNil/isNil.js b/test3/isNil/isNil.js similarity index 100% rename from test/isNil/isNil.js rename to test3/isNil/isNil.js diff --git a/test3/isNil/isNil.test.js b/test3/isNil/isNil.test.js new file mode 100644 index 000000000..d3412b0fb --- /dev/null +++ b/test3/isNil/isNil.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const isNil = require('./isNil.js'); + +test('Testing isNil', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isNil === 'function').toBeTruthy(); + expect(isNil(null)).toBe(true); + expect(isNil(undefined)).toBe(true); + expect(isNil('')).toBe(false); +}); diff --git a/test/isNull/isNull.js b/test3/isNull/isNull.js similarity index 100% rename from test/isNull/isNull.js rename to test3/isNull/isNull.js diff --git a/test3/isNull/isNull.test.js b/test3/isNull/isNull.test.js new file mode 100644 index 000000000..d9d6935c0 --- /dev/null +++ b/test3/isNull/isNull.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const isNull = require('./isNull.js'); + +test('Testing isNull', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isNull === 'function').toBeTruthy(); + expect(isNull(null)).toBe(true); + expect(isNull(NaN)).toBe(false); +}); \ No newline at end of file diff --git a/test/isNumber/isNumber.js b/test3/isNumber/isNumber.js similarity index 100% rename from test/isNumber/isNumber.js rename to test3/isNumber/isNumber.js diff --git a/test3/isNumber/isNumber.test.js b/test3/isNumber/isNumber.test.js new file mode 100644 index 000000000..c0effd774 --- /dev/null +++ b/test3/isNumber/isNumber.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const isNumber = require('./isNumber.js'); + +test('Testing isNumber', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isNumber === 'function').toBeTruthy(); + expect(isNumber(1)).toBe(true); + expect(isNumber('1')).toBe(false); +}); \ No newline at end of file diff --git a/test/isObject/isObject.js b/test3/isObject/isObject.js similarity index 100% rename from test/isObject/isObject.js rename to test3/isObject/isObject.js diff --git a/test3/isObject/isObject.test.js b/test3/isObject/isObject.test.js new file mode 100644 index 000000000..8531462f5 --- /dev/null +++ b/test3/isObject/isObject.test.js @@ -0,0 +1,13 @@ +const expect = require('expect'); +const isObject = require('./isObject.js'); + +test('Testing isObject', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isObject === 'function').toBeTruthy(); + + expect(isObject([1, 2, 3, 4])).toBeTruthy(); + expect(isObject([])).toBeTruthy(); + expect(isObject({ a:1 })).toBeTruthy(); + expect(isObject(true)).toBeFalsy(); +}); diff --git a/test/isObjectLike/isObjectLike.js b/test3/isObjectLike/isObjectLike.js similarity index 100% rename from test/isObjectLike/isObjectLike.js rename to test3/isObjectLike/isObjectLike.js diff --git a/test3/isObjectLike/isObjectLike.test.js b/test3/isObjectLike/isObjectLike.test.js new file mode 100644 index 000000000..5058fe8b1 --- /dev/null +++ b/test3/isObjectLike/isObjectLike.test.js @@ -0,0 +1,12 @@ +const expect = require('expect'); +const isObjectLike = require('./isObjectLike.js'); + +test('Testing isObjectLike', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isObjectLike === 'function').toBeTruthy(); + expect(isObjectLike({})).toBe(true); + expect(isObjectLike([1, 2, 3])).toBe(true); + expect(isObjectLike(x => x)).toBe(false); + expect(isObjectLike(null)).toBe(false); +}); diff --git a/test/isPlainObject/isPlainObject.js b/test3/isPlainObject/isPlainObject.js similarity index 100% rename from test/isPlainObject/isPlainObject.js rename to test3/isPlainObject/isPlainObject.js diff --git a/test3/isPlainObject/isPlainObject.test.js b/test3/isPlainObject/isPlainObject.test.js new file mode 100644 index 000000000..ce6feaa5b --- /dev/null +++ b/test3/isPlainObject/isPlainObject.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const isPlainObject = require('./isPlainObject.js'); + +test('Testing isPlainObject', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isPlainObject === 'function').toBeTruthy(); + expect(isPlainObject({ a: 1 })).toBe(true); + expect(isPlainObject(new Map())).toBe(false); +}); diff --git a/test/JSONToDate/JSONToDate.js b/test4/JSONToDate/JSONToDate.js similarity index 100% rename from test/JSONToDate/JSONToDate.js rename to test4/JSONToDate/JSONToDate.js diff --git a/test4/JSONToDate/JSONToDate.test.js b/test4/JSONToDate/JSONToDate.test.js new file mode 100644 index 000000000..bf3f186c8 --- /dev/null +++ b/test4/JSONToDate/JSONToDate.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const JSONToDate = require('./JSONToDate.js'); + +test('Testing JSONToDate', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof JSONToDate === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/JSONToFile/JSONToFile.js b/test4/JSONToFile/JSONToFile.js similarity index 100% rename from test/JSONToFile/JSONToFile.js rename to test4/JSONToFile/JSONToFile.js diff --git a/test4/JSONToFile/JSONToFile.test.js b/test4/JSONToFile/JSONToFile.test.js new file mode 100644 index 000000000..6a17cb86d --- /dev/null +++ b/test4/JSONToFile/JSONToFile.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const JSONToFile = require('./JSONToFile.js'); + +test('Testing JSONToFile', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof JSONToFile === 'function').toBeTruthy(); +}); diff --git a/test/isPrime/isPrime.js b/test4/isPrime/isPrime.js similarity index 100% rename from test/isPrime/isPrime.js rename to test4/isPrime/isPrime.js diff --git a/test4/isPrime/isPrime.test.js b/test4/isPrime/isPrime.test.js new file mode 100644 index 000000000..5d17948ef --- /dev/null +++ b/test4/isPrime/isPrime.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const isPrime = require('./isPrime.js'); + +test('Testing isPrime', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isPrime === 'function').toBeTruthy(); + expect(isPrime(11)).toBe(true); +}); \ No newline at end of file diff --git a/test/isPrimitive/isPrimitive.js b/test4/isPrimitive/isPrimitive.js similarity index 100% rename from test/isPrimitive/isPrimitive.js rename to test4/isPrimitive/isPrimitive.js diff --git a/test4/isPrimitive/isPrimitive.test.js b/test4/isPrimitive/isPrimitive.test.js new file mode 100644 index 000000000..0ce6c26b0 --- /dev/null +++ b/test4/isPrimitive/isPrimitive.test.js @@ -0,0 +1,23 @@ +const expect = require('expect'); +const isPrimitive = require('./isPrimitive.js'); + +test('Testing isPrimitive', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isPrimitive === 'function').toBeTruthy(); + expect(isPrimitive(null)).toBeTruthy(); + expect(isPrimitive(undefined)).toBeTruthy(); + expect(isPrimitive('string')).toBeTruthy(); + expect(isPrimitive(true)).toBeTruthy(); + expect(isPrimitive(50)).toBeTruthy(); + expect(isPrimitive('Hello')).toBeTruthy(); + expect(isPrimitive(false)).toBeTruthy(); + expect(isPrimitive(Symbol())).toBeTruthy(); + expect(isPrimitive([1, 2, 3])).toBeFalsy(); + expect(isPrimitive({ a: 123 })).toBeFalsy(); + + let start = new Date().getTime(); + isPrimitive({ a: 123 }); + let end = new Date().getTime(); + expect((end - start) < 2000).toBeTruthy(); +}); \ No newline at end of file diff --git a/test/isPromiseLike/isPromiseLike.js b/test4/isPromiseLike/isPromiseLike.js similarity index 100% rename from test/isPromiseLike/isPromiseLike.js rename to test4/isPromiseLike/isPromiseLike.js diff --git a/test4/isPromiseLike/isPromiseLike.test.js b/test4/isPromiseLike/isPromiseLike.test.js new file mode 100644 index 000000000..a971c86f0 --- /dev/null +++ b/test4/isPromiseLike/isPromiseLike.test.js @@ -0,0 +1,15 @@ +const expect = require('expect'); +const isPromiseLike = require('./isPromiseLike.js'); + +test('Testing isPromiseLike', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isPromiseLike === 'function').toBeTruthy(); + expect(isPromiseLike({ + then: function() { + return ''; + } + })).toBe(true); + expect(isPromiseLike(null)).toBe(false); + expect(isPromiseLike({})).toBe(false); +}); diff --git a/test/isRegExp/isRegExp.js b/test4/isRegExp/isRegExp.js similarity index 100% rename from test/isRegExp/isRegExp.js rename to test4/isRegExp/isRegExp.js diff --git a/test4/isRegExp/isRegExp.test.js b/test4/isRegExp/isRegExp.test.js new file mode 100644 index 000000000..c72df0593 --- /dev/null +++ b/test4/isRegExp/isRegExp.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const isRegExp = require('./isRegExp.js'); + +test('Testing isRegExp', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isRegExp === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/isSet/isSet.js b/test4/isSet/isSet.js similarity index 100% rename from test/isSet/isSet.js rename to test4/isSet/isSet.js diff --git a/test4/isSet/isSet.test.js b/test4/isSet/isSet.test.js new file mode 100644 index 000000000..0cc4d8995 --- /dev/null +++ b/test4/isSet/isSet.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const isSet = require('./isSet.js'); + +test('Testing isSet', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isSet === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/isSimilar/isSimilar.js b/test4/isSimilar/isSimilar.js similarity index 100% rename from test/isSimilar/isSimilar.js rename to test4/isSimilar/isSimilar.js diff --git a/test4/isSimilar/isSimilar.test.js b/test4/isSimilar/isSimilar.test.js new file mode 100644 index 000000000..24d4e6abf --- /dev/null +++ b/test4/isSimilar/isSimilar.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const isSimilar = require('./isSimilar.js'); + +test('Testing isSimilar', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isSimilar === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/isSorted/isSorted.js b/test4/isSorted/isSorted.js similarity index 100% rename from test/isSorted/isSorted.js rename to test4/isSorted/isSorted.js diff --git a/test4/isSorted/isSorted.test.js b/test4/isSorted/isSorted.test.js new file mode 100644 index 000000000..c9f3432d6 --- /dev/null +++ b/test4/isSorted/isSorted.test.js @@ -0,0 +1,20 @@ +const expect = require('expect'); +const isSorted = require('./isSorted.js'); + +test('Testing isSorted', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isSorted === 'function').toBeTruthy(); + //t.deepEqual(isSorted(args..), 'Expected'); + expect(isSorted([0, 1, 2])).toBe(1); + expect(isSorted([0, 1, 2, 2])).toBe(1); + expect(isSorted([-4, -3, -2])).toBe(1); + expect(isSorted([0, 0, 1, 2])).toBe(1); + expect(isSorted([2, 1, 0])).toBe(-1); + expect(isSorted([2, 2, 1, 0])).toBe(-1); + expect(isSorted([-2, -3, -4])).toBe(-1); + expect(isSorted([2, 1, 0, 0])).toBe(-1); + expect(isSorted([])).toBe(undefined); + expect(isSorted([1])).toBe(0); + expect(isSorted([1, 2, 1])).toBe(0); +}); diff --git a/test/isString/isString.js b/test4/isString/isString.js similarity index 100% rename from test/isString/isString.js rename to test4/isString/isString.js diff --git a/test4/isString/isString.test.js b/test4/isString/isString.test.js new file mode 100644 index 000000000..be8d629a2 --- /dev/null +++ b/test4/isString/isString.test.js @@ -0,0 +1,13 @@ +const expect = require('expect'); +const isString = require('./isString.js'); + +test('Testing isString', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isString === 'function').toBeTruthy(); + expect(isString('foo')).toBe(true); + expect(isString('10')).toBe(true); + expect(isString('')).toBe(true); + expect(isString(10)).toBe(false); + expect(isString(true)).toBe(false); +}); \ No newline at end of file diff --git a/test/isSymbol/isSymbol.js b/test4/isSymbol/isSymbol.js similarity index 100% rename from test/isSymbol/isSymbol.js rename to test4/isSymbol/isSymbol.js diff --git a/test4/isSymbol/isSymbol.test.js b/test4/isSymbol/isSymbol.test.js new file mode 100644 index 000000000..6eebd3e54 --- /dev/null +++ b/test4/isSymbol/isSymbol.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const isSymbol = require('./isSymbol.js'); + +test('Testing isSymbol', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isSymbol === 'function').toBeTruthy(); + expect(isSymbol(Symbol('x'))).toBe(true); +}); \ No newline at end of file diff --git a/test/isTravisCI/isTravisCI.js b/test4/isTravisCI/isTravisCI.js similarity index 100% rename from test/isTravisCI/isTravisCI.js rename to test4/isTravisCI/isTravisCI.js diff --git a/test4/isTravisCI/isTravisCI.test.js b/test4/isTravisCI/isTravisCI.test.js new file mode 100644 index 000000000..58a776d2d --- /dev/null +++ b/test4/isTravisCI/isTravisCI.test.js @@ -0,0 +1,12 @@ +const expect = require('expect'); +const isTravisCI = require('./isTravisCI.js'); + +test('Testing isTravisCI', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isTravisCI === 'function').toBeTruthy(); + if(isTravisCI()) + expect(isTravisCI()).toBeTruthy(); + else + expect(isTravisCI()).toBeFalsy(); +}); diff --git a/test/isTypedArray/isTypedArray.js b/test4/isTypedArray/isTypedArray.js similarity index 100% rename from test/isTypedArray/isTypedArray.js rename to test4/isTypedArray/isTypedArray.js diff --git a/test4/isTypedArray/isTypedArray.test.js b/test4/isTypedArray/isTypedArray.test.js new file mode 100644 index 000000000..deec79621 --- /dev/null +++ b/test4/isTypedArray/isTypedArray.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const isTypedArray = require('./isTypedArray.js'); + +test('Testing isTypedArray', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isTypedArray === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/isUndefined/isUndefined.js b/test4/isUndefined/isUndefined.js similarity index 100% rename from test/isUndefined/isUndefined.js rename to test4/isUndefined/isUndefined.js diff --git a/test4/isUndefined/isUndefined.test.js b/test4/isUndefined/isUndefined.test.js new file mode 100644 index 000000000..d345a2f69 --- /dev/null +++ b/test4/isUndefined/isUndefined.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const isUndefined = require('./isUndefined.js'); + +test('Testing isUndefined', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isUndefined === 'function').toBeTruthy(); + expect(isUndefined(undefined)).toBeTruthy(); +}); diff --git a/test/isUpperCase/isUpperCase.js b/test4/isUpperCase/isUpperCase.js similarity index 100% rename from test/isUpperCase/isUpperCase.js rename to test4/isUpperCase/isUpperCase.js diff --git a/test4/isUpperCase/isUpperCase.test.js b/test4/isUpperCase/isUpperCase.test.js new file mode 100644 index 000000000..660ad5547 --- /dev/null +++ b/test4/isUpperCase/isUpperCase.test.js @@ -0,0 +1,12 @@ +const expect = require('expect'); +const isUpperCase = require('./isUpperCase.js'); + +test('Testing isUpperCase', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isUpperCase === 'function').toBeTruthy(); + //t.deepEqual(isUpperCase(args..), 'Expected'); + expect(isUpperCase('ABC')).toBe(true); + expect(isUpperCase('abc')).toBe(false); + expect(isUpperCase('A3@$')).toBe(true); +}); \ No newline at end of file diff --git a/test/isValidJSON/isValidJSON.js b/test4/isValidJSON/isValidJSON.js similarity index 100% rename from test/isValidJSON/isValidJSON.js rename to test4/isValidJSON/isValidJSON.js diff --git a/test4/isValidJSON/isValidJSON.test.js b/test4/isValidJSON/isValidJSON.test.js new file mode 100644 index 000000000..3d3d9a152 --- /dev/null +++ b/test4/isValidJSON/isValidJSON.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const isValidJSON = require('./isValidJSON.js'); + +test('Testing isValidJSON', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isValidJSON === 'function').toBeTruthy(); + expect(isValidJSON('{"name":"Adam","age":20}')).toBe(true); + expect(isValidJSON('{"name":"Adam",age:"20"}')).toBe(false); + expect(isValidJSON(null)).toBe(true); +}); \ No newline at end of file diff --git a/test/isWeakMap/isWeakMap.js b/test4/isWeakMap/isWeakMap.js similarity index 100% rename from test/isWeakMap/isWeakMap.js rename to test4/isWeakMap/isWeakMap.js diff --git a/test4/isWeakMap/isWeakMap.test.js b/test4/isWeakMap/isWeakMap.test.js new file mode 100644 index 000000000..e79e1410a --- /dev/null +++ b/test4/isWeakMap/isWeakMap.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const isWeakMap = require('./isWeakMap.js'); + +test('Testing isWeakMap', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isWeakMap === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/isWeakSet/isWeakSet.js b/test4/isWeakSet/isWeakSet.js similarity index 100% rename from test/isWeakSet/isWeakSet.js rename to test4/isWeakSet/isWeakSet.js diff --git a/test4/isWeakSet/isWeakSet.test.js b/test4/isWeakSet/isWeakSet.test.js new file mode 100644 index 000000000..7da0fec69 --- /dev/null +++ b/test4/isWeakSet/isWeakSet.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const isWeakSet = require('./isWeakSet.js'); + +test('Testing isWeakSet', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof isWeakSet === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/join/join.js b/test4/join/join.js similarity index 100% rename from test/join/join.js rename to test4/join/join.js diff --git a/test4/join/join.test.js b/test4/join/join.test.js new file mode 100644 index 000000000..6e173d9fa --- /dev/null +++ b/test4/join/join.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const join = require('./join.js'); + +test('Testing join', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof join === 'function').toBeTruthy(); + expect(join(['pen', 'pineapple', 'apple', 'pen'], ',', '&')).toEqual("pen,pineapple,apple&pen"); + expect(join(['pen', 'pineapple', 'apple', 'pen'], ',')).toEqual("pen,pineapple,apple,pen"); + expect(join(['pen', 'pineapple', 'apple', 'pen'])).toEqual("pen,pineapple,apple,pen"); +}); \ No newline at end of file diff --git a/test/last/last.js b/test4/last/last.js similarity index 100% rename from test/last/last.js rename to test4/last/last.js diff --git a/test4/last/last.test.js b/test4/last/last.test.js new file mode 100644 index 000000000..df9817754 --- /dev/null +++ b/test4/last/last.test.js @@ -0,0 +1,20 @@ +const expect = require('expect'); +const last = require('./last.js'); + +test('Testing last', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof last === 'function').toBeTruthy(); + expect(last({ a: 1234}) === undefined).toBeTruthy(); + expect(last([1, 2, 3])).toBe(3); + expect(last({ 0: false})).toBe(undefined); + expect(last('String')).toBe('g'); + expect(() => last(null)).toThrow(); + expect(() => last(undefined)).toThrow(); + 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(); + expect((end - start) < 2000).toBeTruthy(); +}); \ No newline at end of file diff --git a/test/lcm/lcm.js b/test4/lcm/lcm.js similarity index 100% rename from test/lcm/lcm.js rename to test4/lcm/lcm.js diff --git a/test4/lcm/lcm.test.js b/test4/lcm/lcm.test.js new file mode 100644 index 000000000..76e1cf03d --- /dev/null +++ b/test4/lcm/lcm.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const lcm = require('./lcm.js'); + +test('Testing lcm', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof lcm === 'function').toBeTruthy(); + expect(lcm(12, 7)).toBe(84); + expect(lcm(...[1, 3, 4, 5])).toBe(60); +}); \ No newline at end of file diff --git a/test/levenshteinDistance/levenshteinDistance.js b/test4/levenshteinDistance/levenshteinDistance.js similarity index 100% rename from test/levenshteinDistance/levenshteinDistance.js rename to test4/levenshteinDistance/levenshteinDistance.js diff --git a/test4/levenshteinDistance/levenshteinDistance.test.js b/test4/levenshteinDistance/levenshteinDistance.test.js new file mode 100644 index 000000000..01afeb869 --- /dev/null +++ b/test4/levenshteinDistance/levenshteinDistance.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const levenshteinDistance = require('./levenshteinDistance.js'); + +test('Testing levenshteinDistance', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof levenshteinDistance === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/longestItem/longestItem.js b/test4/longestItem/longestItem.js similarity index 100% rename from test/longestItem/longestItem.js rename to test4/longestItem/longestItem.js diff --git a/test4/longestItem/longestItem.test.js b/test4/longestItem/longestItem.test.js new file mode 100644 index 000000000..d4961f009 --- /dev/null +++ b/test4/longestItem/longestItem.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const longestItem = require('./longestItem.js'); + +test('Testing longestItem', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof longestItem === 'function').toBeTruthy(); + expect(longestItem('this', 'is', 'a', 'testcase')).toEqual('testcase'); +}); \ No newline at end of file diff --git a/test/lowercaseKeys/lowercaseKeys.js b/test4/lowercaseKeys/lowercaseKeys.js similarity index 100% rename from test/lowercaseKeys/lowercaseKeys.js rename to test4/lowercaseKeys/lowercaseKeys.js diff --git a/test4/lowercaseKeys/lowercaseKeys.test.js b/test4/lowercaseKeys/lowercaseKeys.test.js new file mode 100644 index 000000000..537b699a7 --- /dev/null +++ b/test4/lowercaseKeys/lowercaseKeys.test.js @@ -0,0 +1,12 @@ +const expect = require('expect'); +const lowercaseKeys = require('./lowercaseKeys.js'); + +test('Testing lowercaseKeys', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof lowercaseKeys === 'function').toBeTruthy(); + const myObj = { Name: 'Adam', sUrnAME: 'Smith' }; + const myObjLower = lowercaseKeys(myObj); + expect(myObjLower).toEqual({name: 'Adam', surname: 'Smith'}); + expect(myObj).toEqual({ Name: 'Adam', sUrnAME: 'Smith' }); +}); diff --git a/test/luhnCheck/luhnCheck.js b/test4/luhnCheck/luhnCheck.js similarity index 100% rename from test/luhnCheck/luhnCheck.js rename to test4/luhnCheck/luhnCheck.js diff --git a/test4/luhnCheck/luhnCheck.test.js b/test4/luhnCheck/luhnCheck.test.js new file mode 100644 index 000000000..dec48f653 --- /dev/null +++ b/test4/luhnCheck/luhnCheck.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const luhnCheck = require('./luhnCheck.js'); + +test('Testing luhnCheck', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof luhnCheck === 'function').toBeTruthy(); + expect(luhnCheck(6011329933655299)).toBe(false); + expect(luhnCheck('4485275742308327')).toBe(true); + expect(luhnCheck(123456789)).toBe(false); +}); \ No newline at end of file diff --git a/test/mapKeys/mapKeys.js b/test4/mapKeys/mapKeys.js similarity index 100% rename from test/mapKeys/mapKeys.js rename to test4/mapKeys/mapKeys.js diff --git a/test4/mapKeys/mapKeys.test.js b/test4/mapKeys/mapKeys.test.js new file mode 100644 index 000000000..0aa00bf36 --- /dev/null +++ b/test4/mapKeys/mapKeys.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const mapKeys = require('./mapKeys.js'); + +test('Testing mapKeys', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof mapKeys === 'function').toBeTruthy(); + expect(mapKeys({ a: 1, b: 2 }, (val, key) => key + val)).toEqual({ a1: 1, b2: 2 }); +}); diff --git a/test/mapObject/mapObject.js b/test4/mapObject/mapObject.js similarity index 100% rename from test/mapObject/mapObject.js rename to test4/mapObject/mapObject.js diff --git a/test4/mapObject/mapObject.test.js b/test4/mapObject/mapObject.test.js new file mode 100644 index 000000000..80c2295a8 --- /dev/null +++ b/test4/mapObject/mapObject.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const mapObject = require('./mapObject.js'); + +test('Testing mapObject', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof mapObject === 'function').toBeTruthy(); + expect(mapObject([1, 2, 3], a => a * a)).toEqual({ 1: 1, 2: 4, 3: 9 }); + expect(mapObject([1, 2, 3, 4], (a, b) => b - a)).toEqual({ 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.js b/test4/mapValues/mapValues.js similarity index 100% rename from test/mapValues/mapValues.js rename to test4/mapValues/mapValues.js diff --git a/test4/mapValues/mapValues.test.js b/test4/mapValues/mapValues.test.js new file mode 100644 index 000000000..862909d71 --- /dev/null +++ b/test4/mapValues/mapValues.test.js @@ -0,0 +1,13 @@ +const expect = require('expect'); +const mapValues = require('./mapValues.js'); + +test('Testing mapValues', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof mapValues === 'function').toBeTruthy(); + const users = { + fred: { user: 'fred', age: 40 }, + pebbles: { user: 'pebbles', age: 1 } + }; + expect(mapValues(users, u => u.age)).toEqual({ fred: 40, pebbles: 1 }); +}); diff --git a/test/mask/mask.js b/test4/mask/mask.js similarity index 100% rename from test/mask/mask.js rename to test4/mask/mask.js diff --git a/test4/mask/mask.test.js b/test4/mask/mask.test.js new file mode 100644 index 000000000..a313029c0 --- /dev/null +++ b/test4/mask/mask.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const mask = require('./mask.js'); + +test('Testing mask', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof mask === 'function').toBeTruthy(); + expect(mask(1234567890)).toBe('******7890'); + expect(mask(1234567890, 3)).toBe('*******890'); + expect(mask(1234567890, -4, '$')).toBe('$$$$567890'); +}); \ No newline at end of file diff --git a/test/matches/matches.js b/test4/matches/matches.js similarity index 100% rename from test/matches/matches.js rename to test4/matches/matches.js diff --git a/test4/matches/matches.test.js b/test4/matches/matches.test.js new file mode 100644 index 000000000..b8c61f7fb --- /dev/null +++ b/test4/matches/matches.test.js @@ -0,0 +1,14 @@ +const expect = require('expect'); +const matches = require('./matches.js'); + +test('Testing matches', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof matches === 'function').toBeTruthy(); + expect( + matches({ age: 25, hair: 'long', beard: true }, { hair: 'long', beard: true }) + ).toBeTruthy(); + expect( + matches({ hair: 'long', beard: true }, { age: 25, hair: 'long', beard: true }) + ).toBeFalsy(); +}); diff --git a/test/matchesWith/matchesWith.js b/test4/matchesWith/matchesWith.js similarity index 100% rename from test/matchesWith/matchesWith.js rename to test4/matchesWith/matchesWith.js diff --git a/test4/matchesWith/matchesWith.test.js b/test4/matchesWith/matchesWith.test.js new file mode 100644 index 000000000..aef31c802 --- /dev/null +++ b/test4/matchesWith/matchesWith.test.js @@ -0,0 +1,14 @@ +const expect = require('expect'); +const matchesWith = require('./matchesWith.js'); + +test('Testing matchesWith', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof matchesWith === 'function').toBeTruthy(); + const isGreeting = val => /^h(?:i|ello)$/.test(val); + expect(matchesWith( + { greeting: 'hello' }, + { greeting: 'hi' }, + (oV, sV) => isGreeting(oV) && isGreeting(sV) + )).toBeTruthy(); +}); diff --git a/test/maxBy/maxBy.js b/test4/maxBy/maxBy.js similarity index 100% rename from test/maxBy/maxBy.js rename to test4/maxBy/maxBy.js diff --git a/test4/maxBy/maxBy.test.js b/test4/maxBy/maxBy.test.js new file mode 100644 index 000000000..041e16d5f --- /dev/null +++ b/test4/maxBy/maxBy.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const maxBy = require('./maxBy.js'); + +test('Testing maxBy', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof maxBy === 'function').toBeTruthy(); + expect(maxBy([{ n: 4 }, { n: 2 }, { n: 8 }, { n: 6 }], o => o.n)).toBe(8); + expect(maxBy([{ n: 4 }, { n: 2 }, { n: 8 }, { n: 6 }], 'n')).toBe(8); +}); diff --git a/test/maxN/maxN.js b/test4/maxN/maxN.js similarity index 100% rename from test/maxN/maxN.js rename to test4/maxN/maxN.js diff --git a/test4/maxN/maxN.test.js b/test4/maxN/maxN.test.js new file mode 100644 index 000000000..e714acd04 --- /dev/null +++ b/test4/maxN/maxN.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const maxN = require('./maxN.js'); + +test('Testing maxN', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof maxN === 'function').toBeTruthy(); + expect(maxN([1, 2, 3])).toEqual([3]); + expect(maxN([1, 2, 3], 2)).toEqual([3, 2]); +}); \ No newline at end of file diff --git a/test/median/median.js b/test4/median/median.js similarity index 100% rename from test/median/median.js rename to test4/median/median.js diff --git a/test4/median/median.test.js b/test4/median/median.test.js new file mode 100644 index 000000000..d7e14899e --- /dev/null +++ b/test4/median/median.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const median = require('./median.js'); + +test('Testing median', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof median === 'function').toBeTruthy(); + expect(median([5, 6, 50, 1, -5])).toBe(5); + expect(median([1, 2, 3])).toBe(2); +}); \ No newline at end of file diff --git a/test/memoize/memoize.js b/test4/memoize/memoize.js similarity index 100% rename from test/memoize/memoize.js rename to test4/memoize/memoize.js diff --git a/test4/memoize/memoize.test.js b/test4/memoize/memoize.test.js new file mode 100644 index 000000000..29ef30ccb --- /dev/null +++ b/test4/memoize/memoize.test.js @@ -0,0 +1,13 @@ +const expect = require('expect'); +const memoize = require('./memoize.js'); + +test('Testing memoize', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof memoize === 'function').toBeTruthy(); + const f = x => x * x; + const square = memoize(f); + expect(square(2)).toBe(4); + expect(square(3)).toBe(9); + expect(Array.from(square.cache)).toEqual([[2,4],[3,9]]); +}); diff --git a/test/merge/merge.js b/test4/merge/merge.js similarity index 100% rename from test/merge/merge.js rename to test4/merge/merge.js diff --git a/test4/merge/merge.test.js b/test4/merge/merge.test.js new file mode 100644 index 000000000..c3369f320 --- /dev/null +++ b/test4/merge/merge.test.js @@ -0,0 +1,18 @@ +const expect = require('expect'); +const merge = require('./merge.js'); + +test('Testing merge', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof merge === 'function').toBeTruthy(); + const object = { + a: [{ x: 2 }, { y: 4 }], + b: 1 + }; + const other = { + a: { z: 3 }, + b: [2, 3], + c: 'foo' + }; + expect(merge(object, other)).toEqual({ a: [ { x: 2 }, { y: 4 }, { z: 3 } ], b: [ 1, 2, 3 ], c: 'foo' }); +}); diff --git a/test/minBy/minBy.js b/test4/minBy/minBy.js similarity index 100% rename from test/minBy/minBy.js rename to test4/minBy/minBy.js diff --git a/test4/minBy/minBy.test.js b/test4/minBy/minBy.test.js new file mode 100644 index 000000000..58efee38f --- /dev/null +++ b/test4/minBy/minBy.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const minBy = require('./minBy.js'); + +test('Testing minBy', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof minBy === 'function').toBeTruthy(); + expect(minBy([{ n: 4 }, { n: 2 }, { n: 8 }, { n: 6 }], o => o.n)).toBe(2); + expect(minBy([{ n: 4 }, { n: 2 }, { n: 8 }, { n: 6 }], 'n')).toBe(2); +}); diff --git a/test/minN/minN.js b/test4/minN/minN.js similarity index 100% rename from test/minN/minN.js rename to test4/minN/minN.js diff --git a/test4/minN/minN.test.js b/test4/minN/minN.test.js new file mode 100644 index 000000000..c10fd200f --- /dev/null +++ b/test4/minN/minN.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const minN = require('./minN.js'); + +test('Testing minN', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof minN === 'function').toBeTruthy(); + expect(minN([1, 2, 3])).toEqual([1]); + expect(minN([1, 2, 3], 2)).toEqual([1, 2]); +}); \ No newline at end of file diff --git a/test/mostPerformant/mostPerformant.js b/test4/mostPerformant/mostPerformant.js similarity index 100% rename from test/mostPerformant/mostPerformant.js rename to test4/mostPerformant/mostPerformant.js diff --git a/test4/mostPerformant/mostPerformant.test.js b/test4/mostPerformant/mostPerformant.test.js new file mode 100644 index 000000000..b83d3ff0f --- /dev/null +++ b/test4/mostPerformant/mostPerformant.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const mostPerformant = require('./mostPerformant.js'); + +test('Testing mostPerformant', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof mostPerformant === 'function').toBeTruthy(); +}); diff --git a/test/negate/negate.js b/test4/negate/negate.js similarity index 100% rename from test/negate/negate.js rename to test4/negate/negate.js diff --git a/test4/negate/negate.test.js b/test4/negate/negate.test.js new file mode 100644 index 000000000..3a3799bb8 --- /dev/null +++ b/test4/negate/negate.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const negate = require('./negate.js'); + +test('Testing negate', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof negate === 'function').toBeTruthy(); + expect([1, 2, 3, 4, 5, 6].filter(negate(n => n % 2 === 0))).toEqual([1, 3, 5]); +}); diff --git a/test/nest/nest.js b/test4/nest/nest.js similarity index 100% rename from test/nest/nest.js rename to test4/nest/nest.js diff --git a/test4/nest/nest.test.js b/test4/nest/nest.test.js new file mode 100644 index 000000000..2866537ad --- /dev/null +++ b/test4/nest/nest.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const nest = require('./nest.js'); + +test('Testing nest', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof nest === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/nodeListToArray/nodeListToArray.js b/test4/nodeListToArray/nodeListToArray.js similarity index 100% rename from test/nodeListToArray/nodeListToArray.js rename to test4/nodeListToArray/nodeListToArray.js diff --git a/test4/nodeListToArray/nodeListToArray.test.js b/test4/nodeListToArray/nodeListToArray.test.js new file mode 100644 index 000000000..cc16b355d --- /dev/null +++ b/test4/nodeListToArray/nodeListToArray.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const nodeListToArray = require('./nodeListToArray.js'); + +test('Testing nodeListToArray', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof nodeListToArray === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/none/none.js b/test4/none/none.js similarity index 100% rename from test/none/none.js rename to test4/none/none.js diff --git a/test4/none/none.test.js b/test4/none/none.test.js new file mode 100644 index 000000000..fdf7c6bbc --- /dev/null +++ b/test4/none/none.test.js @@ -0,0 +1,12 @@ +const expect = require('expect'); +const none = require('./none.js'); + +test('Testing none', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof none === 'function').toBeTruthy(); + expect(none([0,undefined,NaN,null,''])).toBeTruthy(); + expect(none([0,1])).toBeFalsy(); + expect(none([4,1,0,3], x => x < 0)).toBeTruthy(); + expect(none([0,1,2], x => x === 1)).toBeFalsy(); +}); diff --git a/test/nthArg/nthArg.js b/test4/nthArg/nthArg.js similarity index 100% rename from test/nthArg/nthArg.js rename to test4/nthArg/nthArg.js diff --git a/test4/nthArg/nthArg.test.js b/test4/nthArg/nthArg.test.js new file mode 100644 index 000000000..b63828fe4 --- /dev/null +++ b/test4/nthArg/nthArg.test.js @@ -0,0 +1,13 @@ +const expect = require('expect'); +const nthArg = require('./nthArg.js'); + +test('Testing nthArg', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof nthArg === 'function').toBeTruthy(); + const third = nthArg(2); + expect(third(1, 2, 3)).toBe(3); + expect(third(1, 2)).toBe(undefined); + const last = nthArg(-1); + expect(last(1, 2, 3, 4, 5)).toBe(5); +}); diff --git a/test/nthElement/nthElement.js b/test4/nthElement/nthElement.js similarity index 100% rename from test/nthElement/nthElement.js rename to test4/nthElement/nthElement.js diff --git a/test4/nthElement/nthElement.test.js b/test4/nthElement/nthElement.test.js new file mode 100644 index 000000000..3ba010c0d --- /dev/null +++ b/test4/nthElement/nthElement.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const nthElement = require('./nthElement.js'); + +test('Testing nthElement', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof nthElement === 'function').toBeTruthy(); + expect(nthElement(['a', 'b', 'c'], 1)).toBe('b'); + expect(nthElement(['a', 'b', 'c'], -3)).toBe('a'); +}); \ No newline at end of file diff --git a/test/objectFromPairs/objectFromPairs.js b/test4/objectFromPairs/objectFromPairs.js similarity index 100% rename from test/objectFromPairs/objectFromPairs.js rename to test4/objectFromPairs/objectFromPairs.js diff --git a/test4/objectFromPairs/objectFromPairs.test.js b/test4/objectFromPairs/objectFromPairs.test.js new file mode 100644 index 000000000..7497fee6a --- /dev/null +++ b/test4/objectFromPairs/objectFromPairs.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const objectFromPairs = require('./objectFromPairs.js'); + +test('Testing objectFromPairs', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof objectFromPairs === 'function').toBeTruthy(); + expect(objectFromPairs([['a', 1], ['b', 2]])).toEqual({a: 1, b: 2}); +}); \ No newline at end of file diff --git a/test/objectToPairs/objectToPairs.js b/test4/objectToPairs/objectToPairs.js similarity index 100% rename from test/objectToPairs/objectToPairs.js rename to test4/objectToPairs/objectToPairs.js diff --git a/test4/objectToPairs/objectToPairs.test.js b/test4/objectToPairs/objectToPairs.test.js new file mode 100644 index 000000000..c274408bd --- /dev/null +++ b/test4/objectToPairs/objectToPairs.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const objectToPairs = require('./objectToPairs.js'); + +test('Testing objectToPairs', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof objectToPairs === 'function').toBeTruthy(); + expect(objectToPairs({ a: 1, b: 2 })).toEqual([['a',1],['b',2]]); +}); \ No newline at end of file diff --git a/test/observeMutations/observeMutations.js b/test4/observeMutations/observeMutations.js similarity index 100% rename from test/observeMutations/observeMutations.js rename to test4/observeMutations/observeMutations.js diff --git a/test4/observeMutations/observeMutations.test.js b/test4/observeMutations/observeMutations.test.js new file mode 100644 index 000000000..4cf9349e0 --- /dev/null +++ b/test4/observeMutations/observeMutations.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const observeMutations = require('./observeMutations.js'); + +test('Testing observeMutations', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof observeMutations === 'function').toBeTruthy(); +}); diff --git a/test/off/off.js b/test4/off/off.js similarity index 100% rename from test/off/off.js rename to test4/off/off.js diff --git a/test4/off/off.test.js b/test4/off/off.test.js new file mode 100644 index 000000000..90702b03a --- /dev/null +++ b/test4/off/off.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const off = require('./off.js'); + +test('Testing off', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof off === 'function').toBeTruthy(); +}); diff --git a/test/offset/offset.js b/test4/offset/offset.js similarity index 100% rename from test/offset/offset.js rename to test4/offset/offset.js diff --git a/test4/offset/offset.test.js b/test4/offset/offset.test.js new file mode 100644 index 000000000..8cf281e0c --- /dev/null +++ b/test4/offset/offset.test.js @@ -0,0 +1,14 @@ +const expect = require('expect'); +const offset = require('./offset.js'); + +test('Testing offset', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof offset === 'function').toBeTruthy(); + expect(offset([1, 2, 3, 4, 5], 0)).toEqual([1, 2, 3, 4, 5]); + expect(offset([1, 2, 3, 4, 5], 2)).toEqual([3, 4, 5, 1, 2]); + expect(offset([1, 2, 3, 4, 5], -2)).toEqual([4, 5, 1, 2, 3]); + expect(offset([1, 2, 3, 4, 5], 6)).toEqual([1, 2, 3, 4, 5]); + expect(offset([1, 2, 3, 4, 5], -6)).toEqual([1, 2, 3, 4, 5]); + expect(offset([], 3)).toEqual([]); +}); diff --git a/test/omit/omit.js b/test4/omit/omit.js similarity index 100% rename from test/omit/omit.js rename to test4/omit/omit.js diff --git a/test4/omit/omit.test.js b/test4/omit/omit.test.js new file mode 100644 index 000000000..bcb2365ee --- /dev/null +++ b/test4/omit/omit.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const omit = require('./omit.js'); + +test('Testing omit', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof omit === 'function').toBeTruthy(); + expect(omit({ a: 1, b: '2', c: 3 }, ['b'])).toEqual({ 'a': 1, 'c': 3 }); +}); diff --git a/test/RGBToHex/RGBToHex.js b/test5/RGBToHex/RGBToHex.js similarity index 100% rename from test/RGBToHex/RGBToHex.js rename to test5/RGBToHex/RGBToHex.js diff --git a/test5/RGBToHex/RGBToHex.test.js b/test5/RGBToHex/RGBToHex.test.js new file mode 100644 index 000000000..d0fc0f92e --- /dev/null +++ b/test5/RGBToHex/RGBToHex.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const RGBToHex = require('./RGBToHex.js'); + +test('Testing RGBToHex', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof RGBToHex === 'function').toBeTruthy(); + expect(RGBToHex(255, 165, 1)).toBe('ffa501'); +}); \ No newline at end of file diff --git a/test/omitBy/omitBy.js b/test5/omitBy/omitBy.js similarity index 100% rename from test/omitBy/omitBy.js rename to test5/omitBy/omitBy.js diff --git a/test5/omitBy/omitBy.test.js b/test5/omitBy/omitBy.test.js new file mode 100644 index 000000000..dce45eea2 --- /dev/null +++ b/test5/omitBy/omitBy.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const omitBy = require('./omitBy.js'); + +test('Testing omitBy', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof omitBy === 'function').toBeTruthy(); + expect(omitBy({ a: 1, b: '2', c: 3 }, x => typeof x === 'number')).toEqual({ b: '2' }); +}); diff --git a/test/on/on.js b/test5/on/on.js similarity index 100% rename from test/on/on.js rename to test5/on/on.js diff --git a/test5/on/on.test.js b/test5/on/on.test.js new file mode 100644 index 000000000..7fbf62c6c --- /dev/null +++ b/test5/on/on.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const on = require('./on.js'); + +test('Testing on', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof on === 'function').toBeTruthy(); +}); diff --git a/test/onUserInputChange/onUserInputChange.js b/test5/onUserInputChange/onUserInputChange.js similarity index 100% rename from test/onUserInputChange/onUserInputChange.js rename to test5/onUserInputChange/onUserInputChange.js diff --git a/test5/onUserInputChange/onUserInputChange.test.js b/test5/onUserInputChange/onUserInputChange.test.js new file mode 100644 index 000000000..2224a0f2d --- /dev/null +++ b/test5/onUserInputChange/onUserInputChange.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const onUserInputChange = require('./onUserInputChange.js'); + +test('Testing onUserInputChange', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof onUserInputChange === 'function').toBeTruthy(); +}); diff --git a/test/once/once.js b/test5/once/once.js similarity index 100% rename from test/once/once.js rename to test5/once/once.js diff --git a/test5/once/once.test.js b/test5/once/once.test.js new file mode 100644 index 000000000..0df7c89b2 --- /dev/null +++ b/test5/once/once.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const once = require('./once.js'); + +test('Testing once', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof once === 'function').toBeTruthy(); +}); diff --git a/test/orderBy/orderBy.js b/test5/orderBy/orderBy.js similarity index 100% rename from test/orderBy/orderBy.js rename to test5/orderBy/orderBy.js diff --git a/test5/orderBy/orderBy.test.js b/test5/orderBy/orderBy.test.js new file mode 100644 index 000000000..b2f2079a7 --- /dev/null +++ b/test5/orderBy/orderBy.test.js @@ -0,0 +1,15 @@ +const expect = require('expect'); +const orderBy = require('./orderBy.js'); + +test('Testing orderBy', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof orderBy === 'function').toBeTruthy(); + const users = [{ name: 'fred', age: 48 }, { name: 'barney', age: 36 }, { name: 'fred', age: 40 }]; + expect(orderBy(users, ['name', 'age'], ['asc', 'desc'])).toEqual( + [{name: 'barney', age: 36}, {name: 'fred', age: 48}, {name: 'fred', age: 40}] + ); + expect(orderBy(users, ['name', 'age'])).toEqual( + [{name: 'barney', age: 36}, {name: 'fred', age: 40}, {name: 'fred', age: 48}] + ); +}); \ No newline at end of file diff --git a/test/over/over.js b/test5/over/over.js similarity index 100% rename from test/over/over.js rename to test5/over/over.js diff --git a/test5/over/over.test.js b/test5/over/over.test.js new file mode 100644 index 000000000..0ecda5749 --- /dev/null +++ b/test5/over/over.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const over = require('./over.js'); + +test('Testing over', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof over === 'function').toBeTruthy(); + const minMax = over(Math.min, Math.max); + expect(minMax(1, 2, 3, 4, 5)).toEqual([1,5]); +}); diff --git a/test/overArgs/overArgs.js b/test5/overArgs/overArgs.js similarity index 100% rename from test/overArgs/overArgs.js rename to test5/overArgs/overArgs.js diff --git a/test5/overArgs/overArgs.test.js b/test5/overArgs/overArgs.test.js new file mode 100644 index 000000000..78c9edfd3 --- /dev/null +++ b/test5/overArgs/overArgs.test.js @@ -0,0 +1,12 @@ +const expect = require('expect'); +const overArgs = require('./overArgs.js'); + +test('Testing overArgs', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof overArgs === 'function').toBeTruthy(); + const square = n => n * n; + const double = n => n * 2; + const fn = overArgs((x, y) => [x, y], [square, double]); + expect(fn(9, 3)).toEqual([81, 6]); +}); diff --git a/test/pad/pad.js b/test5/pad/pad.js similarity index 100% rename from test/pad/pad.js rename to test5/pad/pad.js diff --git a/test5/pad/pad.test.js b/test5/pad/pad.test.js new file mode 100644 index 000000000..a2a036ec5 --- /dev/null +++ b/test5/pad/pad.test.js @@ -0,0 +1,12 @@ +const expect = require('expect'); +const pad = require('./pad.js'); + +test('Testing pad', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof pad === 'function').toBeTruthy(); + expect(pad('cat',8)).toBe(' cat '); + expect(pad('cat',8).length).toBe(8); + expect(pad(String(42), 6, '0')).toBe('004200'); + expect(pad('foobar', 3)).toBe('foobar'); +}); diff --git a/test/palindrome/palindrome.js b/test5/palindrome/palindrome.js similarity index 100% rename from test/palindrome/palindrome.js rename to test5/palindrome/palindrome.js diff --git a/test5/palindrome/palindrome.test.js b/test5/palindrome/palindrome.test.js new file mode 100644 index 000000000..44d983dc9 --- /dev/null +++ b/test5/palindrome/palindrome.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const palindrome = require('./palindrome.js'); + +test('Testing palindrome', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof palindrome === 'function').toBeTruthy(); + expect(palindrome('taco cat')).toBe(true); + expect(palindrome('foobar')).toBe(false); +}); \ No newline at end of file diff --git a/test/parseCookie/parseCookie.js b/test5/parseCookie/parseCookie.js similarity index 100% rename from test/parseCookie/parseCookie.js rename to test5/parseCookie/parseCookie.js diff --git a/test5/parseCookie/parseCookie.test.js b/test5/parseCookie/parseCookie.test.js new file mode 100644 index 000000000..84e046a69 --- /dev/null +++ b/test5/parseCookie/parseCookie.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const parseCookie = require('./parseCookie.js'); + +test('Testing parseCookie', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof parseCookie === 'function').toBeTruthy(); + expect(parseCookie('foo=bar; equation=E%3Dmc%5E2')).toEqual({ foo: 'bar', equation: 'E=mc^2' }); +}); diff --git a/test/partial/partial.js b/test5/partial/partial.js similarity index 100% rename from test/partial/partial.js rename to test5/partial/partial.js diff --git a/test5/partial/partial.test.js b/test5/partial/partial.test.js new file mode 100644 index 000000000..813eef79a --- /dev/null +++ b/test5/partial/partial.test.js @@ -0,0 +1,13 @@ +const expect = require('expect'); +const partial = require('./partial.js'); + +test('Testing partial', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof partial === 'function').toBeTruthy(); + function greet(greeting, name) { + return greeting + ' ' + name + '!'; + } + const greetHello = partial(greet, 'Hello'); + expect(greetHello('John')).toBe('Hello John!'); +}); diff --git a/test/partialRight/partialRight.js b/test5/partialRight/partialRight.js similarity index 100% rename from test/partialRight/partialRight.js rename to test5/partialRight/partialRight.js diff --git a/test5/partialRight/partialRight.test.js b/test5/partialRight/partialRight.test.js new file mode 100644 index 000000000..480ce7ec6 --- /dev/null +++ b/test5/partialRight/partialRight.test.js @@ -0,0 +1,13 @@ +const expect = require('expect'); +const partialRight = require('./partialRight.js'); + +test('Testing partialRight', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof partialRight === 'function').toBeTruthy(); + function greet(greeting, name) { + return greeting + ' ' + name + '!'; + } + const greetJohn = partialRight(greet, 'John'); + expect(greetJohn('Hello')).toBe('Hello John!'); +}); diff --git a/test/partition/partition.js b/test5/partition/partition.js similarity index 100% rename from test/partition/partition.js rename to test5/partition/partition.js diff --git a/test5/partition/partition.test.js b/test5/partition/partition.test.js new file mode 100644 index 000000000..968876650 --- /dev/null +++ b/test5/partition/partition.test.js @@ -0,0 +1,12 @@ +const expect = require('expect'); +const partition = require('./partition.js'); + +test('Testing partition', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof partition === 'function').toBeTruthy(); + const users = [{ user: 'barney', age: 36, active: false }, { user: 'fred', age: 40, active: true }]; + expect(partition(users, o => o.active)).toEqual( + [[{ 'user': 'fred', 'age': 40, 'active': true }],[{ 'user': 'barney', 'age': 36, 'active': false }]] + ); +}); \ No newline at end of file diff --git a/test/percentile/percentile.js b/test5/percentile/percentile.js similarity index 100% rename from test/percentile/percentile.js rename to test5/percentile/percentile.js diff --git a/test5/percentile/percentile.test.js b/test5/percentile/percentile.test.js new file mode 100644 index 000000000..af64d3032 --- /dev/null +++ b/test5/percentile/percentile.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const percentile = require('./percentile.js'); + +test('Testing percentile', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof percentile === 'function').toBeTruthy(); + expect(percentile([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 6)).toBe(55); +}); \ No newline at end of file diff --git a/test/permutations/permutations.js b/test5/permutations/permutations.js similarity index 100% rename from test/permutations/permutations.js rename to test5/permutations/permutations.js diff --git a/test5/permutations/permutations.test.js b/test5/permutations/permutations.test.js new file mode 100644 index 000000000..9aa5fa4fb --- /dev/null +++ b/test5/permutations/permutations.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const permutations = require('./permutations.js'); + +test('Testing permutations', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof permutations === 'function').toBeTruthy(); + 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.js b/test5/pick/pick.js similarity index 100% rename from test/pick/pick.js rename to test5/pick/pick.js diff --git a/test5/pick/pick.test.js b/test5/pick/pick.test.js new file mode 100644 index 000000000..20f11cb4d --- /dev/null +++ b/test5/pick/pick.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const pick = require('./pick.js'); + +test('Testing pick', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof pick === 'function').toBeTruthy(); + expect(pick({ a: 1, b: '2', c: 3 }, ['a', 'c'])).toEqual({ 'a': 1, 'c': 3 }); +}); \ No newline at end of file diff --git a/test/pickBy/pickBy.js b/test5/pickBy/pickBy.js similarity index 100% rename from test/pickBy/pickBy.js rename to test5/pickBy/pickBy.js diff --git a/test5/pickBy/pickBy.test.js b/test5/pickBy/pickBy.test.js new file mode 100644 index 000000000..8c5620d33 --- /dev/null +++ b/test5/pickBy/pickBy.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const pickBy = require('./pickBy.js'); + +test('Testing pickBy', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof pickBy === 'function').toBeTruthy(); + expect(pickBy({ a: 1, b: '2', c: 3 }, x => typeof x === 'number')).toEqual({ 'a': 1, 'c': 3 }); +}); diff --git a/test/pipeAsyncFunctions/pipeAsyncFunctions.js b/test5/pipeAsyncFunctions/pipeAsyncFunctions.js similarity index 100% rename from test/pipeAsyncFunctions/pipeAsyncFunctions.js rename to test5/pipeAsyncFunctions/pipeAsyncFunctions.js diff --git a/test5/pipeAsyncFunctions/pipeAsyncFunctions.test.js b/test5/pipeAsyncFunctions/pipeAsyncFunctions.test.js new file mode 100644 index 000000000..5724dec11 --- /dev/null +++ b/test5/pipeAsyncFunctions/pipeAsyncFunctions.test.js @@ -0,0 +1,19 @@ +const expect = require('expect'); +const pipeAsyncFunctions = require('./pipeAsyncFunctions.js'); + +test('Testing pipeAsyncFunctions', async () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof pipeAsyncFunctions === 'function').toBeTruthy(); + //t.deepEqual(pipeAsyncFunctions(args..), 'Expected'); + //t.equal(pipeAsyncFunctions(args..), 'Expected'); + //t.false(pipeAsyncFunctions(args..), 'Expected'); + //t.throws(pipeAsyncFunctions(args..), 'Expected'); + expect(await pipeAsyncFunctions( + (x) => x + 1, + (x) => new Promise((resolve) => setTimeout(() => resolve(x + 2), 0)), + (x) => x + 3, + async (x) => await x + 4, + ) + (5)).toBe(15); +}); \ No newline at end of file diff --git a/test/pipeFunctions/pipeFunctions.js b/test5/pipeFunctions/pipeFunctions.js similarity index 100% rename from test/pipeFunctions/pipeFunctions.js rename to test5/pipeFunctions/pipeFunctions.js diff --git a/test5/pipeFunctions/pipeFunctions.test.js b/test5/pipeFunctions/pipeFunctions.test.js new file mode 100644 index 000000000..b334a71ae --- /dev/null +++ b/test5/pipeFunctions/pipeFunctions.test.js @@ -0,0 +1,12 @@ +const expect = require('expect'); +const pipeFunctions = require('./pipeFunctions.js'); + +test('Testing pipeFunctions', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof pipeFunctions === 'function').toBeTruthy(); + const add5 = x => x + 5; + const multiply = (x, y) => x * y; + const multiplyAndAdd5 = pipeFunctions(multiply, add5); + expect(multiplyAndAdd5(5, 2)).toBe(15); +}); diff --git a/test/pluralize/pluralize.js b/test5/pluralize/pluralize.js similarity index 100% rename from test/pluralize/pluralize.js rename to test5/pluralize/pluralize.js diff --git a/test5/pluralize/pluralize.test.js b/test5/pluralize/pluralize.test.js new file mode 100644 index 000000000..4fafc2f10 --- /dev/null +++ b/test5/pluralize/pluralize.test.js @@ -0,0 +1,18 @@ +const expect = require('expect'); +const pluralize = require('./pluralize.js'); + +test('Testing pluralize', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof pluralize === 'function').toBeTruthy(); + expect(pluralize(0, 'apple')).toBe('apples'); + expect(pluralize(1, 'apple')).toBe('apple'); + expect(pluralize(2, 'apple')).toBe('apples'); + expect(pluralize(2, 'person', 'people')).toBe('people'); + const PLURALS = { + person: 'people', + radius: 'radii' + }; + const autoPluralize = pluralize(PLURALS); + expect(autoPluralize(2, 'person')).toBe('people'); +}); diff --git a/test/powerset/powerset.js b/test5/powerset/powerset.js similarity index 100% rename from test/powerset/powerset.js rename to test5/powerset/powerset.js diff --git a/test5/powerset/powerset.test.js b/test5/powerset/powerset.test.js new file mode 100644 index 000000000..7413dedb8 --- /dev/null +++ b/test5/powerset/powerset.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const powerset = require('./powerset.js'); + +test('Testing powerset', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof powerset === 'function').toBeTruthy(); + expect(powerset([1, 2])).toEqual([[], [1], [2], [2,1]]); +}); \ No newline at end of file diff --git a/test/prefix/prefix.js b/test5/prefix/prefix.js similarity index 100% rename from test/prefix/prefix.js rename to test5/prefix/prefix.js diff --git a/test5/prefix/prefix.test.js b/test5/prefix/prefix.test.js new file mode 100644 index 000000000..c4f88eca6 --- /dev/null +++ b/test5/prefix/prefix.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const prefix = require('./prefix.js'); + +test('Testing prefix', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof prefix === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/prettyBytes/prettyBytes.js b/test5/prettyBytes/prettyBytes.js similarity index 100% rename from test/prettyBytes/prettyBytes.js rename to test5/prettyBytes/prettyBytes.js diff --git a/test5/prettyBytes/prettyBytes.test.js b/test5/prettyBytes/prettyBytes.test.js new file mode 100644 index 000000000..a2cccd3a6 --- /dev/null +++ b/test5/prettyBytes/prettyBytes.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const prettyBytes = require('./prettyBytes.js'); + +test('Testing prettyBytes', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof prettyBytes === 'function').toBeTruthy(); + expect(prettyBytes(1000)).toBe('1 KB'); + expect(prettyBytes(-27145424323.5821, 5)).toBe('-27.145 GB'); + expect(prettyBytes(123456789, 3, false)).toBe('123MB'); +}); \ No newline at end of file diff --git a/test/primes/primes.js b/test5/primes/primes.js similarity index 100% rename from test/primes/primes.js rename to test5/primes/primes.js diff --git a/test5/primes/primes.test.js b/test5/primes/primes.test.js new file mode 100644 index 000000000..d0b4ae15c --- /dev/null +++ b/test5/primes/primes.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const primes = require('./primes.js'); + +test('Testing primes', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof primes === 'function').toBeTruthy(); + expect(primes(10)).toEqual([2, 3, 5, 7]); +}); \ No newline at end of file diff --git a/test/promisify/promisify.js b/test5/promisify/promisify.js similarity index 100% rename from test/promisify/promisify.js rename to test5/promisify/promisify.js diff --git a/test5/promisify/promisify.test.js b/test5/promisify/promisify.test.js new file mode 100644 index 000000000..145a8c004 --- /dev/null +++ b/test5/promisify/promisify.test.js @@ -0,0 +1,12 @@ +const expect = require('expect'); +const promisify = require('./promisify.js'); + +test('Testing promisify', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof promisify === 'function').toBeTruthy(); + const x = promisify(Math.max); + expect(x() instanceof Promise).toBeTruthy(); + const delay = promisify((d, cb) => setTimeout(cb, d)); + delay(200).then(() => ); +}); diff --git a/test/pull/pull.js b/test5/pull/pull.js similarity index 100% rename from test/pull/pull.js rename to test5/pull/pull.js diff --git a/test5/pull/pull.test.js b/test5/pull/pull.test.js new file mode 100644 index 000000000..f38d1c0bf --- /dev/null +++ b/test5/pull/pull.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const pull = require('./pull.js'); + +test('Testing pull', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof pull === 'function').toBeTruthy(); + let myArray = ['a', 'b', 'c', 'a', 'b', 'c']; + pull(myArray, 'a', 'c'); + expect(myArray).toEqual(['b','b']); +}); diff --git a/test/pullAtIndex/pullAtIndex.js b/test5/pullAtIndex/pullAtIndex.js similarity index 100% rename from test/pullAtIndex/pullAtIndex.js rename to test5/pullAtIndex/pullAtIndex.js diff --git a/test5/pullAtIndex/pullAtIndex.test.js b/test5/pullAtIndex/pullAtIndex.test.js new file mode 100644 index 000000000..9715d6c95 --- /dev/null +++ b/test5/pullAtIndex/pullAtIndex.test.js @@ -0,0 +1,12 @@ +const expect = require('expect'); +const pullAtIndex = require('./pullAtIndex.js'); + +test('Testing pullAtIndex', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof pullAtIndex === 'function').toBeTruthy(); + let myArray = ['a', 'b', 'c', 'd']; + let pulled = pullAtIndex(myArray, [1, 3]); + expect(myArray).toEqual([ 'a', 'c' ]); + expect(pulled).toEqual([ 'b', 'd' ]); +}); diff --git a/test/pullAtValue/pullAtValue.js b/test5/pullAtValue/pullAtValue.js similarity index 100% rename from test/pullAtValue/pullAtValue.js rename to test5/pullAtValue/pullAtValue.js diff --git a/test5/pullAtValue/pullAtValue.test.js b/test5/pullAtValue/pullAtValue.test.js new file mode 100644 index 000000000..b15a3baa4 --- /dev/null +++ b/test5/pullAtValue/pullAtValue.test.js @@ -0,0 +1,12 @@ +const expect = require('expect'); +const pullAtValue = require('./pullAtValue.js'); + +test('Testing pullAtValue', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof pullAtValue === 'function').toBeTruthy(); + let myArray = ['a', 'b', 'c', 'd']; + let pulled = pullAtValue(myArray, ['b', 'd']); + expect(myArray).toEqual([ 'a', 'c' ]); + expect(pulled).toEqual([ 'b', 'd' ]); +}); diff --git a/test/pullBy/pullBy.js b/test5/pullBy/pullBy.js similarity index 100% rename from test/pullBy/pullBy.js rename to test5/pullBy/pullBy.js diff --git a/test5/pullBy/pullBy.test.js b/test5/pullBy/pullBy.test.js new file mode 100644 index 000000000..5b6f656d5 --- /dev/null +++ b/test5/pullBy/pullBy.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const pullBy = require('./pullBy.js'); + +test('Testing pullBy', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof pullBy === 'function').toBeTruthy(); + var myArray = [{ x: 1 }, { x: 2 }, { x: 3 }, { x: 1 }]; + pullBy(myArray, [{ x: 1 }, { x: 3 }], o => o.x); + expect(myArray).toEqual([{ x: 2 }]); +}); diff --git a/test/quickSort/quickSort.js b/test5/quickSort/quickSort.js similarity index 100% rename from test/quickSort/quickSort.js rename to test5/quickSort/quickSort.js diff --git a/test5/quickSort/quickSort.test.js b/test5/quickSort/quickSort.test.js new file mode 100644 index 000000000..019749405 --- /dev/null +++ b/test5/quickSort/quickSort.test.js @@ -0,0 +1,20 @@ +const expect = require('expect'); +const quickSort = require('./quickSort.js'); + +test('Testing quickSort', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof quickSort === 'function').toBeTruthy(); + expect(quickSort([5, 6, 4, 3, 1, 2])).toEqual([1, 2, 3, 4, 5, 6]); + expect(quickSort([-1, 0, -2])).toEqual([-2, -1, 0]); + expect(() => quickSort()).toThrow(); + expect(() => quickSort(123)).toThrow(); + expect(() => quickSort({ 234: string})).toThrow(); + expect(() => quickSort(null)).toThrow(); + 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(); + expect((end - start) < 2000).toBeTruthy(); +}); diff --git a/test/radsToDegrees/radsToDegrees.js b/test5/radsToDegrees/radsToDegrees.js similarity index 100% rename from test/radsToDegrees/radsToDegrees.js rename to test5/radsToDegrees/radsToDegrees.js diff --git a/test5/radsToDegrees/radsToDegrees.test.js b/test5/radsToDegrees/radsToDegrees.test.js new file mode 100644 index 000000000..4b492e176 --- /dev/null +++ b/test5/radsToDegrees/radsToDegrees.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const radsToDegrees = require('./radsToDegrees.js'); + +test('Testing radsToDegrees', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof radsToDegrees === 'function').toBeTruthy(); + expect(radsToDegrees(Math.PI / 2)).toBe(90); +}); diff --git a/test/randomHexColorCode/randomHexColorCode.js b/test5/randomHexColorCode/randomHexColorCode.js similarity index 100% rename from test/randomHexColorCode/randomHexColorCode.js rename to test5/randomHexColorCode/randomHexColorCode.js diff --git a/test5/randomHexColorCode/randomHexColorCode.test.js b/test5/randomHexColorCode/randomHexColorCode.test.js new file mode 100644 index 000000000..c2d92bf7c --- /dev/null +++ b/test5/randomHexColorCode/randomHexColorCode.test.js @@ -0,0 +1,12 @@ +const expect = require('expect'); +const randomHexColorCode = require('./randomHexColorCode.js'); + +test('Testing randomHexColorCode', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof randomHexColorCode === 'function').toBeTruthy(); + //t.deepEqual(randomHexColorCode(args..), 'Expected'); + expect(randomHexColorCode().length).toBe(7); + expect(randomHexColorCode().startsWith('#')).toBeTruthy(); + expect(randomHexColorCode().slice(1).match(/[^0123456789abcdef]/i) === null).toBeTruthy(); +}); diff --git a/test/randomIntArrayInRange/randomIntArrayInRange.js b/test5/randomIntArrayInRange/randomIntArrayInRange.js similarity index 100% rename from test/randomIntArrayInRange/randomIntArrayInRange.js rename to test5/randomIntArrayInRange/randomIntArrayInRange.js diff --git a/test5/randomIntArrayInRange/randomIntArrayInRange.test.js b/test5/randomIntArrayInRange/randomIntArrayInRange.test.js new file mode 100644 index 000000000..cff9657e5 --- /dev/null +++ b/test5/randomIntArrayInRange/randomIntArrayInRange.test.js @@ -0,0 +1,14 @@ +const expect = require('expect'); +const randomIntArrayInRange = require('./randomIntArrayInRange.js'); + +test('Testing randomIntArrayInRange', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof randomIntArrayInRange === 'function').toBeTruthy(); + const lowerLimit = Math.floor(Math.random() * 20); + const upperLimit = Math.floor(lowerLimit + Math.random() * 10); + const arr = randomIntArrayInRange(lowerLimit,upperLimit, 10); + expect(arr.every(x => typeof x === 'number')).toBeTruthy(); + expect(arr.length).toBe(10); + expect(arr.every(x => (x >= lowerLimit) && (x <= upperLimit))).toBeTruthy(); +}); diff --git a/test/randomIntegerInRange/randomIntegerInRange.js b/test5/randomIntegerInRange/randomIntegerInRange.js similarity index 100% rename from test/randomIntegerInRange/randomIntegerInRange.js rename to test5/randomIntegerInRange/randomIntegerInRange.js diff --git a/test5/randomIntegerInRange/randomIntegerInRange.test.js b/test5/randomIntegerInRange/randomIntegerInRange.test.js new file mode 100644 index 000000000..04ebd1d4f --- /dev/null +++ b/test5/randomIntegerInRange/randomIntegerInRange.test.js @@ -0,0 +1,13 @@ +const expect = require('expect'); +const randomIntegerInRange = require('./randomIntegerInRange.js'); + +test('Testing randomIntegerInRange', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof randomIntegerInRange === 'function').toBeTruthy(); + const lowerLimit = Math.floor(Math.random() * 20); + const upperLimit = Math.floor(lowerLimit + Math.random() * 10); + expect(Number.isInteger(randomIntegerInRange(lowerLimit,upperLimit))).toBeTruthy(); + const numberForTest = randomIntegerInRange(lowerLimit,upperLimit); + expect((numberForTest >= lowerLimit) && (numberForTest <= upperLimit)).toBeTruthy(); +}); diff --git a/test/randomNumberInRange/randomNumberInRange.js b/test5/randomNumberInRange/randomNumberInRange.js similarity index 100% rename from test/randomNumberInRange/randomNumberInRange.js rename to test5/randomNumberInRange/randomNumberInRange.js diff --git a/test5/randomNumberInRange/randomNumberInRange.test.js b/test5/randomNumberInRange/randomNumberInRange.test.js new file mode 100644 index 000000000..646322ce8 --- /dev/null +++ b/test5/randomNumberInRange/randomNumberInRange.test.js @@ -0,0 +1,13 @@ +const expect = require('expect'); +const randomNumberInRange = require('./randomNumberInRange.js'); + +test('Testing randomNumberInRange', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof randomNumberInRange === 'function').toBeTruthy(); + const lowerLimit = Math.floor(Math.random() * 20); + const upperLimit = Math.floor(lowerLimit + Math.random() * 10); + expect(typeof randomNumberInRange(lowerLimit,upperLimit) === 'number').toBeTruthy(); + const numberForTest = randomNumberInRange(lowerLimit,upperLimit); + expect((numberForTest >= lowerLimit) && (numberForTest <= upperLimit)).toBeTruthy(); +}); diff --git a/test/readFileLines/readFileLines.js b/test5/readFileLines/readFileLines.js similarity index 100% rename from test/readFileLines/readFileLines.js rename to test5/readFileLines/readFileLines.js diff --git a/test5/readFileLines/readFileLines.test.js b/test5/readFileLines/readFileLines.test.js new file mode 100644 index 000000000..36813c5b5 --- /dev/null +++ b/test5/readFileLines/readFileLines.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const readFileLines = require('./readFileLines.js'); + +test('Testing readFileLines', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof readFileLines === 'function').toBeTruthy(); +}); diff --git a/test/rearg/rearg.js b/test5/rearg/rearg.js similarity index 100% rename from test/rearg/rearg.js rename to test5/rearg/rearg.js diff --git a/test5/rearg/rearg.test.js b/test5/rearg/rearg.test.js new file mode 100644 index 000000000..ce426c97c --- /dev/null +++ b/test5/rearg/rearg.test.js @@ -0,0 +1,15 @@ +const expect = require('expect'); +const rearg = require('./rearg.js'); + +test('Testing rearg', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof rearg === 'function').toBeTruthy(); + var rearged = rearg( + function(a, b, c) { + return [a, b, c]; + }, + [2, 0, 1] + ); + expect(rearged('b', 'c', 'a')).toEqual(['a', 'b', 'c']); +}); diff --git a/test/recordAnimationFrames/recordAnimationFrames.js b/test5/recordAnimationFrames/recordAnimationFrames.js similarity index 100% rename from test/recordAnimationFrames/recordAnimationFrames.js rename to test5/recordAnimationFrames/recordAnimationFrames.js diff --git a/test5/recordAnimationFrames/recordAnimationFrames.test.js b/test5/recordAnimationFrames/recordAnimationFrames.test.js new file mode 100644 index 000000000..9c71212e5 --- /dev/null +++ b/test5/recordAnimationFrames/recordAnimationFrames.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const recordAnimationFrames = require('./recordAnimationFrames.js'); + +test('Testing recordAnimationFrames', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof recordAnimationFrames === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/redirect/redirect.js b/test5/redirect/redirect.js similarity index 100% rename from test/redirect/redirect.js rename to test5/redirect/redirect.js diff --git a/test5/redirect/redirect.test.js b/test5/redirect/redirect.test.js new file mode 100644 index 000000000..d468f09ec --- /dev/null +++ b/test5/redirect/redirect.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const redirect = require('./redirect.js'); + +test('Testing redirect', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof redirect === 'function').toBeTruthy(); +}); diff --git a/test/reduceSuccessive/reduceSuccessive.js b/test5/reduceSuccessive/reduceSuccessive.js similarity index 100% rename from test/reduceSuccessive/reduceSuccessive.js rename to test5/reduceSuccessive/reduceSuccessive.js diff --git a/test5/reduceSuccessive/reduceSuccessive.test.js b/test5/reduceSuccessive/reduceSuccessive.test.js new file mode 100644 index 000000000..4bb7fada1 --- /dev/null +++ b/test5/reduceSuccessive/reduceSuccessive.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const reduceSuccessive = require('./reduceSuccessive.js'); + +test('Testing reduceSuccessive', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof reduceSuccessive === 'function').toBeTruthy(); + 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.js b/test5/reduceWhich/reduceWhich.js similarity index 100% rename from test/reduceWhich/reduceWhich.js rename to test5/reduceWhich/reduceWhich.js diff --git a/test5/reduceWhich/reduceWhich.test.js b/test5/reduceWhich/reduceWhich.test.js new file mode 100644 index 000000000..46b14797e --- /dev/null +++ b/test5/reduceWhich/reduceWhich.test.js @@ -0,0 +1,14 @@ +const expect = require('expect'); +const reduceWhich = require('./reduceWhich.js'); + +test('Testing reduceWhich', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof reduceWhich === 'function').toBeTruthy(); + expect(reduceWhich([1, 3, 2])).toBe(1); + expect(reduceWhich([1, 3, 2], (a, b) => b - a)).toBe(3); + expect(reduceWhich( + [{ name: 'Tom', age: 12 }, { name: 'Jack', age: 18 }, { name: 'Lucy', age: 9 }], + (a, b) => a.age - b.age +)).toEqual({name: "Lucy", age: 9}); +}); diff --git a/test/reducedFilter/reducedFilter.js b/test5/reducedFilter/reducedFilter.js similarity index 100% rename from test/reducedFilter/reducedFilter.js rename to test5/reducedFilter/reducedFilter.js diff --git a/test5/reducedFilter/reducedFilter.test.js b/test5/reducedFilter/reducedFilter.test.js new file mode 100644 index 000000000..a9f87d3e6 --- /dev/null +++ b/test5/reducedFilter/reducedFilter.test.js @@ -0,0 +1,21 @@ +const expect = require('expect'); +const reducedFilter = require('./reducedFilter.js'); + +test('Testing reducedFilter', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof reducedFilter === 'function').toBeTruthy(); + const data = [ + { + id: 1, + name: 'john', + age: 24 + }, + { + id: 2, + name: 'mike', + age: 50 + } + ]; + expect(reducedFilter(data, ['id', 'name'], item => item.age > 24)).toEqual([{ id: 2, name: 'mike'}]); +}); \ No newline at end of file diff --git a/test/reject/reject.js b/test5/reject/reject.js similarity index 100% rename from test/reject/reject.js rename to test5/reject/reject.js diff --git a/test/reject/reject.test.js b/test5/reject/reject.test.js similarity index 60% rename from test/reject/reject.test.js rename to test5/reject/reject.test.js index a82244682..525aaeab4 100644 --- a/test/reject/reject.test.js +++ b/test5/reject/reject.test.js @@ -1,24 +1,22 @@ -const test = require('tape'); +const expect = require('expect'); const reject = require('./reject.js'); -test('Testing reject', (t) => { +test('Testing reject', () => { //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'); + expect(typeof reject === 'function').toBeTruthy(); const noEvens = reject( (x) => x % 2 === 0, [1, 2, 3, 4, 5] ); - t.deepEqual(noEvens, [1, 3, 5]); + expect(noEvens).toEqual([1, 3, 5]); const fourLettersOrLess = reject( (word) => word.length > 4, ['Apple', 'Pear', 'Kiwi', 'Banana'] ); - t.deepEqual(fourLettersOrLess, ['Pear', 'Kiwi']); - - t.end(); + expect(fourLettersOrLess).toEqual(['Pear', 'Kiwi']); }); diff --git a/test/remove/remove.js b/test5/remove/remove.js similarity index 100% rename from test/remove/remove.js rename to test5/remove/remove.js diff --git a/test5/remove/remove.test.js b/test5/remove/remove.test.js new file mode 100644 index 000000000..235ec23ac --- /dev/null +++ b/test5/remove/remove.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const remove = require('./remove.js'); + +test('Testing remove', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof remove === 'function').toBeTruthy(); + expect(remove([1, 2, 3, 4], n => n % 2 === 0)).toEqual([2, 4]); +}); diff --git a/test/removeNonASCII/removeNonASCII.js b/test5/removeNonASCII/removeNonASCII.js similarity index 100% rename from test/removeNonASCII/removeNonASCII.js rename to test5/removeNonASCII/removeNonASCII.js diff --git a/test5/removeNonASCII/removeNonASCII.test.js b/test5/removeNonASCII/removeNonASCII.test.js new file mode 100644 index 000000000..d0d22b435 --- /dev/null +++ b/test5/removeNonASCII/removeNonASCII.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const removeNonASCII = require('./removeNonASCII.js'); + +test('Testing removeNonASCII', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof removeNonASCII === 'function').toBeTruthy(); + expect(removeNonASCII('äÄçÇéÉêlorem-ipsumöÖÐþúÚ')).toBe('lorem-ipsum'); +}); diff --git a/test/removeVowels/removeVowels.js b/test5/removeVowels/removeVowels.js similarity index 100% rename from test/removeVowels/removeVowels.js rename to test5/removeVowels/removeVowels.js diff --git a/test5/removeVowels/removeVowels.test.js b/test5/removeVowels/removeVowels.test.js new file mode 100644 index 000000000..79896ad4a --- /dev/null +++ b/test5/removeVowels/removeVowels.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const removeVowels = require('./removeVowels.js'); + +test('Testing removeVowels', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof removeVowels === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/renameKeys/renameKeys.js b/test5/renameKeys/renameKeys.js similarity index 100% rename from test/renameKeys/renameKeys.js rename to test5/renameKeys/renameKeys.js diff --git a/test/renameKeys/renameKeys.test.js b/test5/renameKeys/renameKeys.test.js similarity index 56% rename from test/renameKeys/renameKeys.test.js rename to test5/renameKeys/renameKeys.test.js index 42900ec17..553959820 100644 --- a/test/renameKeys/renameKeys.test.js +++ b/test5/renameKeys/renameKeys.test.js @@ -1,15 +1,13 @@ -const test = require('tape'); +const expect = require('expect'); const renameKeys = require('./renameKeys.js'); -test('Testing renameKeys', (t) => { +test('Testing renameKeys', () => { //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'); + expect(typeof renameKeys === 'function').toBeTruthy(); 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(); + expect(renamedObj).toEqual({ firstName: 'Bobo', passion: 'Front-End Master', shoeSize: 100 }); }); diff --git a/test/reverseString/reverseString.js b/test5/reverseString/reverseString.js similarity index 100% rename from test/reverseString/reverseString.js rename to test5/reverseString/reverseString.js diff --git a/test5/reverseString/reverseString.test.js b/test5/reverseString/reverseString.test.js new file mode 100644 index 000000000..6891a2ca8 --- /dev/null +++ b/test5/reverseString/reverseString.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const reverseString = require('./reverseString.js'); + +test('Testing reverseString', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof reverseString === 'function').toBeTruthy(); + expect(reverseString('foobar')).toBe('raboof'); +}); \ No newline at end of file diff --git a/test/round/round.js b/test5/round/round.js similarity index 100% rename from test/round/round.js rename to test5/round/round.js diff --git a/test5/round/round.test.js b/test5/round/round.test.js new file mode 100644 index 000000000..3dda04bfe --- /dev/null +++ b/test5/round/round.test.js @@ -0,0 +1,22 @@ +const expect = require('expect'); +const round = require('./round.js'); + +test('Testing round', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof round === 'function').toBeTruthy(); + expect(round(1.005, 2)).toBe(1.01); + expect(round(123.3423345345345345344, 11)).toBe(123.34233453453); + expect(round(3.342, 11)).toBe(3.342); + expect(round(1.005)).toBe(1); + expect(isNaN(round([1.005, 2]))).toBeTruthy(); + expect(isNaN(round('string'))).toBeTruthy(); + expect(isNaN(round())).toBeTruthy(); + expect(isNaN(round(132, 413, 4134))).toBeTruthy(); + expect(isNaN(round({a: 132}, 413))).toBeTruthy(); + + let start = new Date().getTime(); + round(123.3423345345345345344, 11); + let end = new Date().getTime(); + expect((end - start) < 2000).toBeTruthy(); +}); diff --git a/test/URLJoin/URLJoin.js b/test6/URLJoin/URLJoin.js similarity index 100% rename from test/URLJoin/URLJoin.js rename to test6/URLJoin/URLJoin.js diff --git a/test6/URLJoin/URLJoin.test.js b/test6/URLJoin/URLJoin.test.js new file mode 100644 index 000000000..203e39fa3 --- /dev/null +++ b/test6/URLJoin/URLJoin.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const URLJoin = require('./URLJoin.js'); + +test('Testing URLJoin', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof URLJoin === 'function').toBeTruthy(); + 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'); + 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.js b/test6/UUIDGeneratorBrowser/UUIDGeneratorBrowser.js similarity index 100% rename from test/UUIDGeneratorBrowser/UUIDGeneratorBrowser.js rename to test6/UUIDGeneratorBrowser/UUIDGeneratorBrowser.js diff --git a/test6/UUIDGeneratorBrowser/UUIDGeneratorBrowser.test.js b/test6/UUIDGeneratorBrowser/UUIDGeneratorBrowser.test.js new file mode 100644 index 000000000..95bc482a7 --- /dev/null +++ b/test6/UUIDGeneratorBrowser/UUIDGeneratorBrowser.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const UUIDGeneratorBrowser = require('./UUIDGeneratorBrowser.js'); + +test('Testing UUIDGeneratorBrowser', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof UUIDGeneratorBrowser === 'function').toBeTruthy(); +}); diff --git a/test/UUIDGeneratorNode/UUIDGeneratorNode.js b/test6/UUIDGeneratorNode/UUIDGeneratorNode.js similarity index 100% rename from test/UUIDGeneratorNode/UUIDGeneratorNode.js rename to test6/UUIDGeneratorNode/UUIDGeneratorNode.js diff --git a/test6/UUIDGeneratorNode/UUIDGeneratorNode.test.js b/test6/UUIDGeneratorNode/UUIDGeneratorNode.test.js new file mode 100644 index 000000000..1be773a7e --- /dev/null +++ b/test6/UUIDGeneratorNode/UUIDGeneratorNode.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const UUIDGeneratorNode = require('./UUIDGeneratorNode.js'); + +test('Testing UUIDGeneratorNode', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof UUIDGeneratorNode === 'function').toBeTruthy(); + const uuid = UUIDGeneratorNode(); + expect([uuid[8], uuid[13], uuid[18], uuid[23]]).toEqual(['-', '-', '-', '-']); + expect(/^[0-9A-Fa-f-]+$/.test(uuid)).toBeTruthy(); +}); diff --git a/test/runAsync/runAsync.js b/test6/runAsync/runAsync.js similarity index 100% rename from test/runAsync/runAsync.js rename to test6/runAsync/runAsync.js diff --git a/test6/runAsync/runAsync.test.js b/test6/runAsync/runAsync.test.js new file mode 100644 index 000000000..703f15186 --- /dev/null +++ b/test6/runAsync/runAsync.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const runAsync = require('./runAsync.js'); + +test('Testing runAsync', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof runAsync === 'function').toBeTruthy(); +}); diff --git a/test/runPromisesInSeries/runPromisesInSeries.js b/test6/runPromisesInSeries/runPromisesInSeries.js similarity index 100% rename from test/runPromisesInSeries/runPromisesInSeries.js rename to test6/runPromisesInSeries/runPromisesInSeries.js diff --git a/test6/runPromisesInSeries/runPromisesInSeries.test.js b/test6/runPromisesInSeries/runPromisesInSeries.test.js new file mode 100644 index 000000000..51e937d2d --- /dev/null +++ b/test6/runPromisesInSeries/runPromisesInSeries.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const runPromisesInSeries = require('./runPromisesInSeries.js'); + +test('Testing runPromisesInSeries', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof runPromisesInSeries === 'function').toBeTruthy(); + const delay = d => new Promise(r => setTimeout(r, d)); + runPromisesInSeries([() => delay(100), () => delay(200).then(() => )]); +}); diff --git a/test/sample/sample.js b/test6/sample/sample.js similarity index 100% rename from test/sample/sample.js rename to test6/sample/sample.js diff --git a/test6/sample/sample.test.js b/test6/sample/sample.test.js new file mode 100644 index 000000000..11847222f --- /dev/null +++ b/test6/sample/sample.test.js @@ -0,0 +1,12 @@ +const expect = require('expect'); +const sample = require('./sample.js'); + +test('Testing sample', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof sample === 'function').toBeTruthy(); + const arr = [3,7,9,11]; + expect(arr.includes(sample(arr))).toBeTruthy(); + expect(sample([1])).toBe(1); + expect(sample([])).toBe(undefined); +}); diff --git a/test/sampleSize/sampleSize.js b/test6/sampleSize/sampleSize.js similarity index 100% rename from test/sampleSize/sampleSize.js rename to test6/sampleSize/sampleSize.js diff --git a/test6/sampleSize/sampleSize.test.js b/test6/sampleSize/sampleSize.test.js new file mode 100644 index 000000000..e955495cf --- /dev/null +++ b/test6/sampleSize/sampleSize.test.js @@ -0,0 +1,14 @@ +const expect = require('expect'); +const sampleSize = require('./sampleSize.js'); + +test('Testing sampleSize', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof sampleSize === 'function').toBeTruthy(); + const arr = [3,7,9,11]; + expect(sampleSize(arr).length).toBe(1); + expect(sampleSize(arr, 2).every(x => arr.includes(x))).toBeTruthy(); + expect(sampleSize(arr, 5).length).toBe(4); + expect(sampleSize([], 2)).toEqual([]); + expect(sampleSize(arr, 0)).toEqual([]); +}); diff --git a/test/scrollToTop/scrollToTop.js b/test6/scrollToTop/scrollToTop.js similarity index 100% rename from test/scrollToTop/scrollToTop.js rename to test6/scrollToTop/scrollToTop.js diff --git a/test6/scrollToTop/scrollToTop.test.js b/test6/scrollToTop/scrollToTop.test.js new file mode 100644 index 000000000..2f0f8ec27 --- /dev/null +++ b/test6/scrollToTop/scrollToTop.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const scrollToTop = require('./scrollToTop.js'); + +test('Testing scrollToTop', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof scrollToTop === 'function').toBeTruthy(); +}); diff --git a/test/sdbm/sdbm.js b/test6/sdbm/sdbm.js similarity index 100% rename from test/sdbm/sdbm.js rename to test6/sdbm/sdbm.js diff --git a/test6/sdbm/sdbm.test.js b/test6/sdbm/sdbm.test.js new file mode 100644 index 000000000..361581a59 --- /dev/null +++ b/test6/sdbm/sdbm.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const sdbm = require('./sdbm.js'); + +test('Testing sdbm', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof sdbm === 'function').toBeTruthy(); + expect(sdbm('name')).toBe(-3521204949); +}); \ No newline at end of file diff --git a/test/serializeCookie/serializeCookie.js b/test6/serializeCookie/serializeCookie.js similarity index 100% rename from test/serializeCookie/serializeCookie.js rename to test6/serializeCookie/serializeCookie.js diff --git a/test6/serializeCookie/serializeCookie.test.js b/test6/serializeCookie/serializeCookie.test.js new file mode 100644 index 000000000..181b0d4c1 --- /dev/null +++ b/test6/serializeCookie/serializeCookie.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const serializeCookie = require('./serializeCookie.js'); + +test('Testing serializeCookie', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof serializeCookie === 'function').toBeTruthy(); + expect(serializeCookie('foo', 'bar')).toBe('foo=bar'); +}); diff --git a/test/setStyle/setStyle.js b/test6/setStyle/setStyle.js similarity index 100% rename from test/setStyle/setStyle.js rename to test6/setStyle/setStyle.js diff --git a/test6/setStyle/setStyle.test.js b/test6/setStyle/setStyle.test.js new file mode 100644 index 000000000..395bb5621 --- /dev/null +++ b/test6/setStyle/setStyle.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const setStyle = require('./setStyle.js'); + +test('Testing setStyle', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof setStyle === 'function').toBeTruthy(); +}); diff --git a/test/shallowClone/shallowClone.js b/test6/shallowClone/shallowClone.js similarity index 100% rename from test/shallowClone/shallowClone.js rename to test6/shallowClone/shallowClone.js diff --git a/test6/shallowClone/shallowClone.test.js b/test6/shallowClone/shallowClone.test.js new file mode 100644 index 000000000..6d6d64666 --- /dev/null +++ b/test6/shallowClone/shallowClone.test.js @@ -0,0 +1,12 @@ +const expect = require('expect'); +const shallowClone = require('./shallowClone.js'); + +test('Testing shallowClone', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof shallowClone === 'function').toBeTruthy(); + const a = { foo: 'bar', obj: { a: 1, b: 2 } }; + const b = shallowClone(a); + expect(a).not.toBe(b); + expect(a.obj).toBe(b.obj); +}); diff --git a/test/show/show.js b/test6/show/show.js similarity index 100% rename from test/show/show.js rename to test6/show/show.js diff --git a/test6/show/show.test.js b/test6/show/show.test.js new file mode 100644 index 000000000..11113916a --- /dev/null +++ b/test6/show/show.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const show = require('./show.js'); + +test('Testing show', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof show === 'function').toBeTruthy(); +}); diff --git a/test/shuffle/shuffle.js b/test6/shuffle/shuffle.js similarity index 100% rename from test/shuffle/shuffle.js rename to test6/shuffle/shuffle.js diff --git a/test6/shuffle/shuffle.test.js b/test6/shuffle/shuffle.test.js new file mode 100644 index 000000000..56c472359 --- /dev/null +++ b/test6/shuffle/shuffle.test.js @@ -0,0 +1,13 @@ +const expect = require('expect'); +const shuffle = require('./shuffle.js'); + +test('Testing shuffle', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof shuffle === 'function').toBeTruthy(); + const arr = [1,2,3,4,5,6]; + expect(shuffle(arr)).not.toBe(arr); + expect(shuffle(arr).every(x => arr.includes(x))).toBeTruthy(); + expect(shuffle([])).toEqual([]); + expect(shuffle([1])).toEqual([1]); +}); diff --git a/test/similarity/similarity.js b/test6/similarity/similarity.js similarity index 100% rename from test/similarity/similarity.js rename to test6/similarity/similarity.js diff --git a/test6/similarity/similarity.test.js b/test6/similarity/similarity.test.js new file mode 100644 index 000000000..2de50178f --- /dev/null +++ b/test6/similarity/similarity.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const similarity = require('./similarity.js'); + +test('Testing similarity', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof similarity === 'function').toBeTruthy(); + expect(similarity([1, 2, 3], [1, 2, 4])).toEqual([1, 2]); //t.equal(similarity(args..), 'Expected'); +}); \ No newline at end of file diff --git a/test/size/size.js b/test6/size/size.js similarity index 100% rename from test/size/size.js rename to test6/size/size.js diff --git a/test6/size/size.test.js b/test6/size/size.test.js new file mode 100644 index 000000000..b35037e1a --- /dev/null +++ b/test6/size/size.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const size = require('./size.js'); + +test('Testing size', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof size === 'function').toBeTruthy(); + expect(size([1, 2, 3, 4, 5])).toBe(5); + // t.equal(size('size'), 4, "Get size of arrays, objects or strings."); DOESN'T WORK IN NODE ENV + expect(size({ one: 1, two: 2, three: 3 })).toBe(3); +}); \ No newline at end of file diff --git a/test/sleep/sleep.js b/test6/sleep/sleep.js similarity index 100% rename from test/sleep/sleep.js rename to test6/sleep/sleep.js diff --git a/test6/sleep/sleep.test.js b/test6/sleep/sleep.test.js new file mode 100644 index 000000000..72c1abf06 --- /dev/null +++ b/test6/sleep/sleep.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const sleep = require('./sleep.js'); + +test('Testing sleep', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof sleep === 'function').toBeTruthy(); + async function sleepyWork() { + await sleep(1000); + } +}); diff --git a/test/smoothScroll/smoothScroll.js b/test6/smoothScroll/smoothScroll.js similarity index 100% rename from test/smoothScroll/smoothScroll.js rename to test6/smoothScroll/smoothScroll.js diff --git a/test6/smoothScroll/smoothScroll.test.js b/test6/smoothScroll/smoothScroll.test.js new file mode 100644 index 000000000..f5475db0e --- /dev/null +++ b/test6/smoothScroll/smoothScroll.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const smoothScroll = require('./smoothScroll.js'); + +test('Testing smoothScroll', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof smoothScroll === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/solveRPN/solveRPN.js b/test6/solveRPN/solveRPN.js similarity index 100% rename from test/solveRPN/solveRPN.js rename to test6/solveRPN/solveRPN.js diff --git a/test6/solveRPN/solveRPN.test.js b/test6/solveRPN/solveRPN.test.js new file mode 100644 index 000000000..f2c2420de --- /dev/null +++ b/test6/solveRPN/solveRPN.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const solveRPN = require('./solveRPN.js'); + +test('Testing solveRPN', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof solveRPN === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/sortCharactersInString/sortCharactersInString.js b/test6/sortCharactersInString/sortCharactersInString.js similarity index 100% rename from test/sortCharactersInString/sortCharactersInString.js rename to test6/sortCharactersInString/sortCharactersInString.js diff --git a/test6/sortCharactersInString/sortCharactersInString.test.js b/test6/sortCharactersInString/sortCharactersInString.test.js new file mode 100644 index 000000000..ab0ab6e1d --- /dev/null +++ b/test6/sortCharactersInString/sortCharactersInString.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const sortCharactersInString = require('./sortCharactersInString.js'); + +test('Testing sortCharactersInString', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof sortCharactersInString === 'function').toBeTruthy(); + expect(sortCharactersInString('cabbage')).toBe('aabbceg'); +}); \ No newline at end of file diff --git a/test/sortedIndex/sortedIndex.js b/test6/sortedIndex/sortedIndex.js similarity index 100% rename from test/sortedIndex/sortedIndex.js rename to test6/sortedIndex/sortedIndex.js diff --git a/test6/sortedIndex/sortedIndex.test.js b/test6/sortedIndex/sortedIndex.test.js new file mode 100644 index 000000000..06af95ed1 --- /dev/null +++ b/test6/sortedIndex/sortedIndex.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const sortedIndex = require('./sortedIndex.js'); + +test('Testing sortedIndex', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof sortedIndex === 'function').toBeTruthy(); + expect(sortedIndex([5, 3, 2, 1], 4)).toBe(1); + expect(sortedIndex([30, 50], 40)).toBe(1); +}); \ No newline at end of file diff --git a/test/sortedIndexBy/sortedIndexBy.js b/test6/sortedIndexBy/sortedIndexBy.js similarity index 100% rename from test/sortedIndexBy/sortedIndexBy.js rename to test6/sortedIndexBy/sortedIndexBy.js diff --git a/test6/sortedIndexBy/sortedIndexBy.test.js b/test6/sortedIndexBy/sortedIndexBy.test.js new file mode 100644 index 000000000..dede4bfdd --- /dev/null +++ b/test6/sortedIndexBy/sortedIndexBy.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const sortedIndexBy = require('./sortedIndexBy.js'); + +test('Testing sortedIndexBy', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof sortedIndexBy === 'function').toBeTruthy(); + expect(sortedIndexBy([{ x: 4 }, { x: 5 }], { x: 4 }, o => o.x)).toBe(0); +}); diff --git a/test/sortedLastIndex/sortedLastIndex.js b/test6/sortedLastIndex/sortedLastIndex.js similarity index 100% rename from test/sortedLastIndex/sortedLastIndex.js rename to test6/sortedLastIndex/sortedLastIndex.js diff --git a/test6/sortedLastIndex/sortedLastIndex.test.js b/test6/sortedLastIndex/sortedLastIndex.test.js new file mode 100644 index 000000000..7ceb05736 --- /dev/null +++ b/test6/sortedLastIndex/sortedLastIndex.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const sortedLastIndex = require('./sortedLastIndex.js'); + +test('Testing sortedLastIndex', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof sortedLastIndex === 'function').toBeTruthy(); + expect(sortedLastIndex([10, 20, 30, 30, 40], 30)).toBe(4); +}); diff --git a/test/sortedLastIndexBy/sortedLastIndexBy.js b/test6/sortedLastIndexBy/sortedLastIndexBy.js similarity index 100% rename from test/sortedLastIndexBy/sortedLastIndexBy.js rename to test6/sortedLastIndexBy/sortedLastIndexBy.js diff --git a/test6/sortedLastIndexBy/sortedLastIndexBy.test.js b/test6/sortedLastIndexBy/sortedLastIndexBy.test.js new file mode 100644 index 000000000..ec71c7f4b --- /dev/null +++ b/test6/sortedLastIndexBy/sortedLastIndexBy.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const sortedLastIndexBy = require('./sortedLastIndexBy.js'); + +test('Testing sortedLastIndexBy', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof sortedLastIndexBy === 'function').toBeTruthy(); + expect(sortedLastIndexBy([{ x: 4 }, { x: 5 }], { x: 4 }, o => o.x)).toBe(1); +}); diff --git a/test/speechSynthesis/speechSynthesis.js b/test6/speechSynthesis/speechSynthesis.js similarity index 100% rename from test/speechSynthesis/speechSynthesis.js rename to test6/speechSynthesis/speechSynthesis.js diff --git a/test6/speechSynthesis/speechSynthesis.test.js b/test6/speechSynthesis/speechSynthesis.test.js new file mode 100644 index 000000000..7546f1972 --- /dev/null +++ b/test6/speechSynthesis/speechSynthesis.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const speechSynthesis = require('./speechSynthesis.js'); + +test('Testing speechSynthesis', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof speechSynthesis === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/splitLines/splitLines.js b/test6/splitLines/splitLines.js similarity index 100% rename from test/splitLines/splitLines.js rename to test6/splitLines/splitLines.js diff --git a/test6/splitLines/splitLines.test.js b/test6/splitLines/splitLines.test.js new file mode 100644 index 000000000..bbeb1c5d8 --- /dev/null +++ b/test6/splitLines/splitLines.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const splitLines = require('./splitLines.js'); + +test('Testing splitLines', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof splitLines === 'function').toBeTruthy(); + expect(splitLines('This\nis a\nmultiline\nstring.\n')).toEqual(['This', 'is a', 'multiline', 'string.' , '']); +}); \ No newline at end of file diff --git a/test/spreadOver/spreadOver.js b/test6/spreadOver/spreadOver.js similarity index 100% rename from test/spreadOver/spreadOver.js rename to test6/spreadOver/spreadOver.js diff --git a/test6/spreadOver/spreadOver.test.js b/test6/spreadOver/spreadOver.test.js new file mode 100644 index 000000000..e198d4c70 --- /dev/null +++ b/test6/spreadOver/spreadOver.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const spreadOver = require('./spreadOver.js'); + +test('Testing spreadOver', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof spreadOver === 'function').toBeTruthy(); + const arrayMax = spreadOver(Math.max); + expect(arrayMax([1, 2, 3])).toBe(3); +}); \ No newline at end of file diff --git a/test/stableSort/stableSort.js b/test6/stableSort/stableSort.js similarity index 100% rename from test/stableSort/stableSort.js rename to test6/stableSort/stableSort.js diff --git a/test/stableSort/stableSort.test.js b/test6/stableSort/stableSort.test.js similarity index 65% rename from test/stableSort/stableSort.test.js rename to test6/stableSort/stableSort.test.js index e8cf95496..1915459ea 100644 --- a/test/stableSort/stableSort.test.js +++ b/test6/stableSort/stableSort.test.js @@ -1,17 +1,16 @@ -const test = require('tape'); +const expect = require('expect'); const stableSort = require('./stableSort.js'); -test('Testing stableSort', (t) => { +test('Testing stableSort', () => { //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'); + expect(typeof stableSort === 'function').toBeTruthy(); //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(); + expect(stableSort(arr, compare)).toEqual(arr); }); diff --git a/test/standardDeviation/standardDeviation.js b/test6/standardDeviation/standardDeviation.js similarity index 100% rename from test/standardDeviation/standardDeviation.js rename to test6/standardDeviation/standardDeviation.js diff --git a/test6/standardDeviation/standardDeviation.test.js b/test6/standardDeviation/standardDeviation.test.js new file mode 100644 index 000000000..0708aff3a --- /dev/null +++ b/test6/standardDeviation/standardDeviation.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const standardDeviation = require('./standardDeviation.js'); + +test('Testing standardDeviation', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof standardDeviation === 'function').toBeTruthy(); + expect(standardDeviation([10, 2, 38, 23, 38, 23, 21])).toBe(13.284434142114991); + expect(standardDeviation([10, 2, 38, 23, 38, 23, 21], true)).toBe(12.29899614287479); +}); \ No newline at end of file diff --git a/test/stringPermutations/stringPermutations.js b/test6/stringPermutations/stringPermutations.js similarity index 100% rename from test/stringPermutations/stringPermutations.js rename to test6/stringPermutations/stringPermutations.js diff --git a/test6/stringPermutations/stringPermutations.test.js b/test6/stringPermutations/stringPermutations.test.js new file mode 100644 index 000000000..85c645ee3 --- /dev/null +++ b/test6/stringPermutations/stringPermutations.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const stringPermutations = require('./stringPermutations.js'); + +test('Testing stringPermutations', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof stringPermutations === 'function').toBeTruthy(); + expect(stringPermutations('abc')).toEqual(['abc','acb','bac','bca','cab','cba']); + expect(stringPermutations('a')).toEqual(['a']); + expect(stringPermutations('')).toEqual(['']); +}); diff --git a/test/stripHTMLTags/stripHTMLTags.js b/test6/stripHTMLTags/stripHTMLTags.js similarity index 100% rename from test/stripHTMLTags/stripHTMLTags.js rename to test6/stripHTMLTags/stripHTMLTags.js diff --git a/test6/stripHTMLTags/stripHTMLTags.test.js b/test6/stripHTMLTags/stripHTMLTags.test.js new file mode 100644 index 000000000..e3c59163f --- /dev/null +++ b/test6/stripHTMLTags/stripHTMLTags.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const stripHTMLTags = require('./stripHTMLTags.js'); + +test('Testing stripHTMLTags', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof stripHTMLTags === 'function').toBeTruthy(); + expect(stripHTMLTags('

lorem ipsum


')).toBe('lorem ipsum'); +}); diff --git a/test/sum/sum.js b/test6/sum/sum.js similarity index 100% rename from test/sum/sum.js rename to test6/sum/sum.js diff --git a/test6/sum/sum.test.js b/test6/sum/sum.test.js new file mode 100644 index 000000000..07b5cafc1 --- /dev/null +++ b/test6/sum/sum.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const sum = require('./sum.js'); + +test('Testing sum', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof sum === 'function').toBeTruthy(); + expect(sum(...[1, 2, 3, 4])).toBe(10); +}); \ No newline at end of file diff --git a/test/sumBy/sumBy.js b/test6/sumBy/sumBy.js similarity index 100% rename from test/sumBy/sumBy.js rename to test6/sumBy/sumBy.js diff --git a/test6/sumBy/sumBy.test.js b/test6/sumBy/sumBy.test.js new file mode 100644 index 000000000..390699e6a --- /dev/null +++ b/test6/sumBy/sumBy.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const sumBy = require('./sumBy.js'); + +test('Testing sumBy', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof sumBy === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/sumPower/sumPower.js b/test6/sumPower/sumPower.js similarity index 100% rename from test/sumPower/sumPower.js rename to test6/sumPower/sumPower.js diff --git a/test6/sumPower/sumPower.test.js b/test6/sumPower/sumPower.test.js new file mode 100644 index 000000000..684c57bc5 --- /dev/null +++ b/test6/sumPower/sumPower.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const sumPower = require('./sumPower.js'); + +test('Testing sumPower', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof sumPower === 'function').toBeTruthy(); + expect(sumPower(10)).toBe(385); + expect(sumPower(10, 3)).toBe(3025); + expect(sumPower(10, 3, 5)).toBe(2925); +}); \ No newline at end of file diff --git a/test/symmetricDifference/symmetricDifference.js b/test6/symmetricDifference/symmetricDifference.js similarity index 100% rename from test/symmetricDifference/symmetricDifference.js rename to test6/symmetricDifference/symmetricDifference.js diff --git a/test6/symmetricDifference/symmetricDifference.test.js b/test6/symmetricDifference/symmetricDifference.test.js new file mode 100644 index 000000000..62c87aed3 --- /dev/null +++ b/test6/symmetricDifference/symmetricDifference.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const symmetricDifference = require('./symmetricDifference.js'); + +test('Testing symmetricDifference', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof symmetricDifference === 'function').toBeTruthy(); + expect(symmetricDifference([1, 2, 3], [1, 2, 4])).toEqual([3, 4]); +}); \ No newline at end of file diff --git a/test/symmetricDifferenceBy/symmetricDifferenceBy.js b/test6/symmetricDifferenceBy/symmetricDifferenceBy.js similarity index 100% rename from test/symmetricDifferenceBy/symmetricDifferenceBy.js rename to test6/symmetricDifferenceBy/symmetricDifferenceBy.js diff --git a/test6/symmetricDifferenceBy/symmetricDifferenceBy.test.js b/test6/symmetricDifferenceBy/symmetricDifferenceBy.test.js new file mode 100644 index 000000000..537e68858 --- /dev/null +++ b/test6/symmetricDifferenceBy/symmetricDifferenceBy.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const symmetricDifferenceBy = require('./symmetricDifferenceBy.js'); + +test('Testing symmetricDifferenceBy', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof symmetricDifferenceBy === 'function').toBeTruthy(); + expect(symmetricDifferenceBy([2.1, 1.2], [2.3, 3.4], Math.floor)).toEqual([ 1.2, 3.4 ]); +}); diff --git a/test/symmetricDifferenceWith/symmetricDifferenceWith.js b/test6/symmetricDifferenceWith/symmetricDifferenceWith.js similarity index 100% rename from test/symmetricDifferenceWith/symmetricDifferenceWith.js rename to test6/symmetricDifferenceWith/symmetricDifferenceWith.js diff --git a/test6/symmetricDifferenceWith/symmetricDifferenceWith.test.js b/test6/symmetricDifferenceWith/symmetricDifferenceWith.test.js new file mode 100644 index 000000000..db58684a5 --- /dev/null +++ b/test6/symmetricDifferenceWith/symmetricDifferenceWith.test.js @@ -0,0 +1,13 @@ +const expect = require('expect'); +const symmetricDifferenceWith = require('./symmetricDifferenceWith.js'); + +test('Testing symmetricDifferenceWith', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof symmetricDifferenceWith === 'function').toBeTruthy(); + expect(symmetricDifferenceWith( + [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, 3.9]); +}); diff --git a/test/tail/tail.js b/test6/tail/tail.js similarity index 100% rename from test/tail/tail.js rename to test6/tail/tail.js diff --git a/test6/tail/tail.test.js b/test6/tail/tail.test.js new file mode 100644 index 000000000..198cdd6e9 --- /dev/null +++ b/test6/tail/tail.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const tail = require('./tail.js'); + +test('Testing tail', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof tail === 'function').toBeTruthy(); + expect(tail([1, 2, 3])).toEqual([2, 3]); + expect(tail([1])).toEqual([1]); +}); \ No newline at end of file diff --git a/test/take/take.js b/test6/take/take.js similarity index 100% rename from test/take/take.js rename to test6/take/take.js diff --git a/test6/take/take.test.js b/test6/take/take.test.js new file mode 100644 index 000000000..52938149d --- /dev/null +++ b/test6/take/take.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const take = require('./take.js'); + +test('Testing take', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof take === 'function').toBeTruthy(); + expect(take([1, 2, 3], 5)).toEqual([1, 2, 3]); + expect(take([1, 2, 3], 0)).toEqual([]); +}); diff --git a/test/takeRight/takeRight.js b/test6/takeRight/takeRight.js similarity index 100% rename from test/takeRight/takeRight.js rename to test6/takeRight/takeRight.js diff --git a/test6/takeRight/takeRight.test.js b/test6/takeRight/takeRight.test.js new file mode 100644 index 000000000..3181ac032 --- /dev/null +++ b/test6/takeRight/takeRight.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const takeRight = require('./takeRight.js'); + +test('Testing takeRight', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof takeRight === 'function').toBeTruthy(); + expect(takeRight([1, 2, 3], 2)).toEqual([2, 3]); + expect(takeRight([1, 2, 3])).toEqual([3]); +}); \ No newline at end of file diff --git a/test/takeRightWhile/takeRightWhile.js b/test6/takeRightWhile/takeRightWhile.js similarity index 100% rename from test/takeRightWhile/takeRightWhile.js rename to test6/takeRightWhile/takeRightWhile.js diff --git a/test6/takeRightWhile/takeRightWhile.test.js b/test6/takeRightWhile/takeRightWhile.test.js new file mode 100644 index 000000000..8adfeba6a --- /dev/null +++ b/test6/takeRightWhile/takeRightWhile.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const takeRightWhile = require('./takeRightWhile.js'); + +test('Testing takeRightWhile', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof takeRightWhile === 'function').toBeTruthy(); + expect(takeRightWhile([1, 2, 3, 4], n => n < 3)).toEqual([3, 4]); +}); diff --git a/test/takeWhile/takeWhile.js b/test6/takeWhile/takeWhile.js similarity index 100% rename from test/takeWhile/takeWhile.js rename to test6/takeWhile/takeWhile.js diff --git a/test6/takeWhile/takeWhile.test.js b/test6/takeWhile/takeWhile.test.js new file mode 100644 index 000000000..267e27bc2 --- /dev/null +++ b/test6/takeWhile/takeWhile.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const takeWhile = require('./takeWhile.js'); + +test('Testing takeWhile', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof takeWhile === 'function').toBeTruthy(); + expect(takeWhile([1, 2, 3, 4], n => n >= 3)).toEqual([1, 2]); +}); diff --git a/test/throttle/throttle.js b/test6/throttle/throttle.js similarity index 100% rename from test/throttle/throttle.js rename to test6/throttle/throttle.js diff --git a/test6/throttle/throttle.test.js b/test6/throttle/throttle.test.js new file mode 100644 index 000000000..9335ed791 --- /dev/null +++ b/test6/throttle/throttle.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const throttle = require('./throttle.js'); + +test('Testing throttle', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof throttle === 'function').toBeTruthy(); +}); diff --git a/test/timeTaken/timeTaken.js b/test6/timeTaken/timeTaken.js similarity index 100% rename from test/timeTaken/timeTaken.js rename to test6/timeTaken/timeTaken.js diff --git a/test6/timeTaken/timeTaken.test.js b/test6/timeTaken/timeTaken.test.js new file mode 100644 index 000000000..8105b99e7 --- /dev/null +++ b/test6/timeTaken/timeTaken.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const timeTaken = require('./timeTaken.js'); + +test('Testing timeTaken', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof timeTaken === 'function').toBeTruthy(); +}); diff --git a/test/times/times.js b/test6/times/times.js similarity index 100% rename from test/times/times.js rename to test6/times/times.js diff --git a/test6/times/times.test.js b/test6/times/times.test.js new file mode 100644 index 000000000..0bd27bb8d --- /dev/null +++ b/test6/times/times.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const times = require('./times.js'); + +test('Testing times', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof times === 'function').toBeTruthy(); + var output = ''; + times(5, i => (output += i)); + expect(output).toBe('01234'); +}); diff --git a/test/toCamelCase/toCamelCase.js b/test6/toCamelCase/toCamelCase.js similarity index 100% rename from test/toCamelCase/toCamelCase.js rename to test6/toCamelCase/toCamelCase.js diff --git a/test6/toCamelCase/toCamelCase.test.js b/test6/toCamelCase/toCamelCase.test.js new file mode 100644 index 000000000..44ed8eee7 --- /dev/null +++ b/test6/toCamelCase/toCamelCase.test.js @@ -0,0 +1,21 @@ +const expect = require('expect'); +const toCamelCase = require('./toCamelCase.js'); + +test('Testing toCamelCase', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof toCamelCase === 'function').toBeTruthy(); + expect(toCamelCase('some_database_field_name')).toBe('someDatabaseFieldName'); + expect(toCamelCase('Some label that needs to be camelized')).toBe('someLabelThatNeedsToBeCamelized'); + expect(toCamelCase('some-javascript-property')).toBe('someJavascriptProperty'); + expect(toCamelCase('some-mixed_string with spaces_underscores-and-hyphens')).toBe('someMixedStringWithSpacesUnderscoresAndHyphens'); + expect(() => toCamelCase()).toThrow(); + expect(() => toCamelCase([])).toThrow(); + expect(() => toCamelCase({})).toThrow(); + expect(() => toCamelCase(123)).toThrow(); + + let start = new Date().getTime(); + toCamelCase('some-mixed_string with spaces_underscores-and-hyphens'); + let end = new Date().getTime(); + expect((end - start) < 2000).toBeTruthy(); +}); diff --git a/test/toCurrency/toCurrency.js b/test6/toCurrency/toCurrency.js similarity index 100% rename from test/toCurrency/toCurrency.js rename to test6/toCurrency/toCurrency.js diff --git a/test6/toCurrency/toCurrency.test.js b/test6/toCurrency/toCurrency.test.js new file mode 100644 index 000000000..094796e01 --- /dev/null +++ b/test6/toCurrency/toCurrency.test.js @@ -0,0 +1,12 @@ +const expect = require('expect'); +const toCurrency = require('./toCurrency.js'); + +test('Testing toCurrency', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof toCurrency === 'function').toBeTruthy(); + expect(toCurrency(123456.789, 'EUR')).toBe('€ 123,456.79'); + expect(toCurrency(123456.789, 'USD', 'en-us')).toBe('$123,456.79'); + //t.equal(toCurrency(123456.789, 'USD', 'fa'), '۱۲۳٬۴۵۶٫۷۹ ؜$', 'currency: US Dollar | currencyLangFormat: Farsi'); - These break in node + expect(toCurrency(322342436423.2435, 'JPY')).toBe('JP¥ 322,342,436,423'); +}); diff --git a/test/toDecimalMark/toDecimalMark.js b/test6/toDecimalMark/toDecimalMark.js similarity index 100% rename from test/toDecimalMark/toDecimalMark.js rename to test6/toDecimalMark/toDecimalMark.js diff --git a/test6/toDecimalMark/toDecimalMark.test.js b/test6/toDecimalMark/toDecimalMark.test.js new file mode 100644 index 000000000..ccd255818 --- /dev/null +++ b/test6/toDecimalMark/toDecimalMark.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const toDecimalMark = require('./toDecimalMark.js'); + +test('Testing toDecimalMark', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof toDecimalMark === 'function').toBeTruthy(); + expect(toDecimalMark(12305030388.9087)).toBe("12,305,030,388.909"); +}); \ No newline at end of file diff --git a/test/toHash/toHash.js b/test6/toHash/toHash.js similarity index 100% rename from test/toHash/toHash.js rename to test6/toHash/toHash.js diff --git a/test6/toHash/toHash.test.js b/test6/toHash/toHash.test.js new file mode 100644 index 000000000..13d1b12ca --- /dev/null +++ b/test6/toHash/toHash.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const toHash = require('./toHash.js'); + +test('Testing toHash', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof toHash === 'function').toBeTruthy(); +}); \ No newline at end of file diff --git a/test/toKebabCase/toKebabCase.js b/test6/toKebabCase/toKebabCase.js similarity index 100% rename from test/toKebabCase/toKebabCase.js rename to test6/toKebabCase/toKebabCase.js diff --git a/test6/toKebabCase/toKebabCase.test.js b/test6/toKebabCase/toKebabCase.test.js new file mode 100644 index 000000000..df6540382 --- /dev/null +++ b/test6/toKebabCase/toKebabCase.test.js @@ -0,0 +1,25 @@ +const expect = require('expect'); +const toKebabCase = require('./toKebabCase.js'); + +test('Testing toKebabCase', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof toKebabCase === 'function').toBeTruthy(); + expect(toKebabCase('camelCase')).toBe('camel-case'); + expect(toKebabCase('some text')).toBe('some-text'); + expect(toKebabCase('some-mixed-string With spaces-underscores-and-hyphens')).toBe('some-mixed-string-with-spaces-underscores-and-hyphens'); + expect( + toKebabCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML') + ).toBe( + 'i-am-listening-to-fm-while-loading-different-url-on-my-browser-and-also-editing-some-xml-and-html' + ); + expect(toKebabCase()).toBe(undefined); + expect(() => toKebabCase([])).toThrow(); + expect(() => toKebabCase({})).toThrow(); + expect(() => toKebabCase(123)).toThrow(); + + let start = new Date().getTime(); + toKebabCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML'); + let end = new Date().getTime(); + expect((end - start) < 2000).toBeTruthy(); +}); diff --git a/test/toOrdinalSuffix/toOrdinalSuffix.js b/test6/toOrdinalSuffix/toOrdinalSuffix.js similarity index 100% rename from test/toOrdinalSuffix/toOrdinalSuffix.js rename to test6/toOrdinalSuffix/toOrdinalSuffix.js diff --git a/test6/toOrdinalSuffix/toOrdinalSuffix.test.js b/test6/toOrdinalSuffix/toOrdinalSuffix.test.js new file mode 100644 index 000000000..03456a4a1 --- /dev/null +++ b/test6/toOrdinalSuffix/toOrdinalSuffix.test.js @@ -0,0 +1,12 @@ +const expect = require('expect'); +const toOrdinalSuffix = require('./toOrdinalSuffix.js'); + +test('Testing toOrdinalSuffix', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof toOrdinalSuffix === 'function').toBeTruthy(); + expect(toOrdinalSuffix('123')).toBe('123rd'); + expect(toOrdinalSuffix(5)).toBe('5th'); + expect(toOrdinalSuffix(1)).toBe('1st'); + expect(toOrdinalSuffix(0)).toBe('0th'); +}); \ No newline at end of file diff --git a/test/toSafeInteger/toSafeInteger.js b/test6/toSafeInteger/toSafeInteger.js similarity index 100% rename from test/toSafeInteger/toSafeInteger.js rename to test6/toSafeInteger/toSafeInteger.js diff --git a/test6/toSafeInteger/toSafeInteger.test.js b/test6/toSafeInteger/toSafeInteger.test.js new file mode 100644 index 000000000..82662b13b --- /dev/null +++ b/test6/toSafeInteger/toSafeInteger.test.js @@ -0,0 +1,23 @@ +const expect = require('expect'); +const toSafeInteger = require('./toSafeInteger.js'); + +test('Testing toSafeInteger', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof toSafeInteger === 'function').toBeTruthy(); + expect(Number(toSafeInteger(3.2))).toBeTruthy(); + expect(toSafeInteger(3.2)).toBe(3); + expect(toSafeInteger('4.2')).toBe(4); + expect(toSafeInteger(4.6)).toBe(5); + expect(toSafeInteger([])).toBe(0); + expect(isNaN(toSafeInteger([1.5, 3124]))).toBeTruthy(); + expect(isNaN(toSafeInteger('string'))).toBeTruthy(); + expect(isNaN(toSafeInteger({}))).toBeTruthy(); + expect(isNaN(toSafeInteger())).toBeTruthy(); + expect(toSafeInteger(Infinity)).toBe(9007199254740991); + + let start = new Date().getTime(); + toSafeInteger(3.2); + let end = new Date().getTime(); + expect((end - start) < 2000).toBeTruthy(); +}); diff --git a/test/toSnakeCase/toSnakeCase.js b/test6/toSnakeCase/toSnakeCase.js similarity index 100% rename from test/toSnakeCase/toSnakeCase.js rename to test6/toSnakeCase/toSnakeCase.js diff --git a/test6/toSnakeCase/toSnakeCase.test.js b/test6/toSnakeCase/toSnakeCase.test.js new file mode 100644 index 000000000..42bd32fe2 --- /dev/null +++ b/test6/toSnakeCase/toSnakeCase.test.js @@ -0,0 +1,25 @@ +const expect = require('expect'); +const toSnakeCase = require('./toSnakeCase.js'); + +test('Testing toSnakeCase', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof toSnakeCase === 'function').toBeTruthy(); + expect(toSnakeCase('camelCase')).toBe('camel_case'); + expect(toSnakeCase('some text')).toBe('some_text'); + expect(toSnakeCase('some-mixed_string With spaces_underscores-and-hyphens')).toBe('some_mixed_string_with_spaces_underscores_and_hyphens'); + expect( + toSnakeCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML') + ).toBe( + 'i_am_listening_to_fm_while_loading_different_url_on_my_browser_and_also_editing_some_xml_and_html' + ); + expect(toSnakeCase()).toBe(undefined); + expect(() => toSnakeCase([])).toThrow(); + expect(() => toSnakeCase({})).toThrow(); + expect(() => toSnakeCase(123)).toThrow(); + + let start = new Date().getTime(); + toSnakeCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML'); + let end = new Date().getTime(); + expect((end - start) < 2000).toBeTruthy(); +}); diff --git a/test/toggleClass/toggleClass.js b/test6/toggleClass/toggleClass.js similarity index 100% rename from test/toggleClass/toggleClass.js rename to test6/toggleClass/toggleClass.js diff --git a/test6/toggleClass/toggleClass.test.js b/test6/toggleClass/toggleClass.test.js new file mode 100644 index 000000000..ed3488b5b --- /dev/null +++ b/test6/toggleClass/toggleClass.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const toggleClass = require('./toggleClass.js'); + +test('Testing toggleClass', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof toggleClass === 'function').toBeTruthy(); +}); diff --git a/test/tomorrow/tomorrow.js b/test6/tomorrow/tomorrow.js similarity index 100% rename from test/tomorrow/tomorrow.js rename to test6/tomorrow/tomorrow.js diff --git a/test6/tomorrow/tomorrow.test.js b/test6/tomorrow/tomorrow.test.js new file mode 100644 index 000000000..ce4b5dddc --- /dev/null +++ b/test6/tomorrow/tomorrow.test.js @@ -0,0 +1,13 @@ +const expect = require('expect'); +const tomorrow = require('./tomorrow.js'); + +test('Testing tomorrow', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof tomorrow === 'function').toBeTruthy(); + const t1 = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() + 1); + const t2 = new Date(tomorrow()); + expect(t1.getFullYear()).toBe(t2.getFullYear()); + expect(t1.getMonth()).toBe(t2.getMonth()); + expect(t1.getDate()).toBe(t2.getDate()); +}); diff --git a/test/transform/transform.js b/test6/transform/transform.js similarity index 100% rename from test/transform/transform.js rename to test6/transform/transform.js diff --git a/test6/transform/transform.test.js b/test6/transform/transform.test.js new file mode 100644 index 000000000..c53499392 --- /dev/null +++ b/test6/transform/transform.test.js @@ -0,0 +1,16 @@ +const expect = require('expect'); +const transform = require('./transform.js'); + +test('Testing transform', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof transform === 'function').toBeTruthy(); + expect(transform( + { a: 1, b: 2, c: 1 }, + (r, v, k) => { + (r[v] || (r[v] = [])).push(k); + return r; + }, + {} +)).toEqual({ '1': ['a', 'c'], '2': ['b'] }); +}); diff --git a/test/truncateString/truncateString.js b/test6/truncateString/truncateString.js similarity index 100% rename from test/truncateString/truncateString.js rename to test6/truncateString/truncateString.js diff --git a/test6/truncateString/truncateString.test.js b/test6/truncateString/truncateString.test.js new file mode 100644 index 000000000..fa9506bee --- /dev/null +++ b/test6/truncateString/truncateString.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const truncateString = require('./truncateString.js'); + +test('Testing truncateString', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof truncateString === 'function').toBeTruthy(); + expect(truncateString('boomerang', 7)).toBe('boom...'); +}); \ No newline at end of file diff --git a/test/truthCheckCollection/truthCheckCollection.js b/test6/truthCheckCollection/truthCheckCollection.js similarity index 100% rename from test/truthCheckCollection/truthCheckCollection.js rename to test6/truthCheckCollection/truthCheckCollection.js diff --git a/test6/truthCheckCollection/truthCheckCollection.test.js b/test6/truthCheckCollection/truthCheckCollection.test.js new file mode 100644 index 000000000..7df47434b --- /dev/null +++ b/test6/truthCheckCollection/truthCheckCollection.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const truthCheckCollection = require('./truthCheckCollection.js'); + +test('Testing truthCheckCollection', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof truthCheckCollection === 'function').toBeTruthy(); + expect( + truthCheckCollection([{ user: 'Tinky-Winky', sex: 'male' }, { user: 'Dipsy', sex: 'male' }], 'sex') + ).toBe(true); +}); \ No newline at end of file diff --git a/test/unary/unary.js b/test6/unary/unary.js similarity index 100% rename from test/unary/unary.js rename to test6/unary/unary.js diff --git a/test6/unary/unary.test.js b/test6/unary/unary.test.js new file mode 100644 index 000000000..0b62e983f --- /dev/null +++ b/test6/unary/unary.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const unary = require('./unary.js'); + +test('Testing unary', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof unary === 'function').toBeTruthy(); + expect(['6', '8', '10'].map(unary(parseInt))).toEqual([6, 8, 10]); +}); diff --git a/test/uncurry/uncurry.js b/test6/uncurry/uncurry.js similarity index 100% rename from test/uncurry/uncurry.js rename to test6/uncurry/uncurry.js diff --git a/test6/uncurry/uncurry.test.js b/test6/uncurry/uncurry.test.js new file mode 100644 index 000000000..72fa6bd80 --- /dev/null +++ b/test6/uncurry/uncurry.test.js @@ -0,0 +1,15 @@ +const expect = require('expect'); +const uncurry = require('./uncurry.js'); + +test('Testing uncurry', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof uncurry === 'function').toBeTruthy(); + const add = x => y => z => x + y + z; + const add1 = uncurry(add); + const add2 = uncurry(add, 2); + const add3 = uncurry(add, 3); + expect(add1(1)(2)(3)).toBe(6); + expect(add2(1,2)(3)).toBe(6); + expect(add3(1,2,3)).toBe(6); +}); diff --git a/test/unescapeHTML/unescapeHTML.js b/test6/unescapeHTML/unescapeHTML.js similarity index 100% rename from test/unescapeHTML/unescapeHTML.js rename to test6/unescapeHTML/unescapeHTML.js diff --git a/test6/unescapeHTML/unescapeHTML.test.js b/test6/unescapeHTML/unescapeHTML.test.js new file mode 100644 index 000000000..d1c7417a6 --- /dev/null +++ b/test6/unescapeHTML/unescapeHTML.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const unescapeHTML = require('./unescapeHTML.js'); + +test('Testing unescapeHTML', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof unescapeHTML === 'function').toBeTruthy(); + expect(unescapeHTML('<a href="#">Me & you</a>')).toBe('Me & you'); +}); \ No newline at end of file diff --git a/test/unflattenObject/unflattenObject.js b/test6/unflattenObject/unflattenObject.js similarity index 100% rename from test/unflattenObject/unflattenObject.js rename to test6/unflattenObject/unflattenObject.js diff --git a/test6/unflattenObject/unflattenObject.test.js b/test6/unflattenObject/unflattenObject.test.js new file mode 100644 index 000000000..48975c4a0 --- /dev/null +++ b/test6/unflattenObject/unflattenObject.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const unflattenObject = require('./unflattenObject.js'); + +test('Testing unflattenObject', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof unflattenObject === 'function').toBeTruthy(); + expect(unflattenObject({ 'a.b.c': 1, d: 1 })).toEqual({ a: { b: { c: 1 } }, d: 1 }); +}); diff --git a/test/unfold/unfold.js b/test6/unfold/unfold.js similarity index 100% rename from test/unfold/unfold.js rename to test6/unfold/unfold.js diff --git a/test6/unfold/unfold.test.js b/test6/unfold/unfold.test.js new file mode 100644 index 000000000..08dd245d5 --- /dev/null +++ b/test6/unfold/unfold.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const unfold = require('./unfold.js'); + +test('Testing unfold', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof unfold === 'function').toBeTruthy(); + var f = n => (n > 50 ? false : [-n, n + 10]); + expect(unfold(f, 10)).toEqual([-10, -20, -30, -40, -50]); +}); diff --git a/test/union/union.js b/test6/union/union.js similarity index 100% rename from test/union/union.js rename to test6/union/union.js diff --git a/test6/union/union.test.js b/test6/union/union.test.js new file mode 100644 index 000000000..a49ba0af5 --- /dev/null +++ b/test6/union/union.test.js @@ -0,0 +1,23 @@ +const expect = require('expect'); +const union = require('./union.js'); + +test('Testing union', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof union === 'function').toBeTruthy(); + expect(union([1, 2, 3], [4, 3, 2])).toEqual([1, 2, 3, 4]); + expect(union('str', 'asd')).toEqual([ 's', 't', 'r', 'a', 'd' ]); + expect(union([[], {}], [1, 2, 3])).toEqual([[], {}, 1, 2, 3]); + expect(union([], [])).toEqual([]); + expect(() => union()).toThrow(); + expect(() => union(true, 'str')).toThrow(); + expect(() => union('false', true)).toThrow(); + expect(() => union(123, {})).toThrow(); + expect(() => union([], {})).toThrow(); + expect(() => union(undefined, null)).toThrow(); + + let start = new Date().getTime(); + union([1, 2, 3], [4, 3, 2]); + let end = new Date().getTime(); + expect((end - start) < 2000).toBeTruthy(); +}); diff --git a/test/unionBy/unionBy.js b/test6/unionBy/unionBy.js similarity index 100% rename from test/unionBy/unionBy.js rename to test6/unionBy/unionBy.js diff --git a/test6/unionBy/unionBy.test.js b/test6/unionBy/unionBy.test.js new file mode 100644 index 000000000..730f9d05a --- /dev/null +++ b/test6/unionBy/unionBy.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const unionBy = require('./unionBy.js'); + +test('Testing unionBy', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof unionBy === 'function').toBeTruthy(); + expect(unionBy([2.1], [1.2, 2.3], Math.floor)).toEqual([2.1, 1.2]); +}); diff --git a/test/unionWith/unionWith.js b/test6/unionWith/unionWith.js similarity index 100% rename from test/unionWith/unionWith.js rename to test6/unionWith/unionWith.js diff --git a/test6/unionWith/unionWith.test.js b/test6/unionWith/unionWith.test.js new file mode 100644 index 000000000..f6d69956e --- /dev/null +++ b/test6/unionWith/unionWith.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const unionWith = require('./unionWith.js'); + +test('Testing unionWith', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof unionWith === 'function').toBeTruthy(); + 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.js b/test6/uniqueElements/uniqueElements.js similarity index 100% rename from test/uniqueElements/uniqueElements.js rename to test6/uniqueElements/uniqueElements.js diff --git a/test6/uniqueElements/uniqueElements.test.js b/test6/uniqueElements/uniqueElements.test.js new file mode 100644 index 000000000..ca9a46bfe --- /dev/null +++ b/test6/uniqueElements/uniqueElements.test.js @@ -0,0 +1,26 @@ +const expect = require('expect'); +const uniqueElements = require('./uniqueElements.js'); + +test('Testing uniqueElements', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof uniqueElements === 'function').toBeTruthy(); + expect(uniqueElements([1, 2, 2, 3, 4, 4, 5])).toEqual([1,2,3,4,5]); + expect(uniqueElements([1, 23, 53])).toEqual([1, 23, 53]); + expect(uniqueElements([true, 0, 1, false, false, undefined, null, ''])).toEqual([true, 0, 1, false, undefined, null, '']); + expect(uniqueElements()).toEqual([]); + expect(uniqueElements(null)).toEqual([]); + expect(uniqueElements(undefined)).toEqual([]); + expect(uniqueElements('strt')).toEqual(['s', 't', 'r']); + expect(() => uniqueElements(1, 1, 2543, 534, 5)).toThrow(); + expect(() => uniqueElements({})).toThrow(); + expect(() => uniqueElements(true)).toThrow(); + expect(() => uniqueElements(false)).toThrow(); + + let start = new Date().getTime(); + uniqueElements([true, 0, 1, false, false, undefined, null, '']); + let end = new Date().getTime(); + 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.js b/test6/untildify/untildify.js similarity index 100% rename from test/untildify/untildify.js rename to test6/untildify/untildify.js diff --git a/test6/untildify/untildify.test.js b/test6/untildify/untildify.test.js new file mode 100644 index 000000000..cbad74b6b --- /dev/null +++ b/test6/untildify/untildify.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const untildify = require('./untildify.js'); + +test('Testing untildify', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof untildify === 'function').toBeTruthy(); + expect(untildify('~/test/dir/file.f').indexOf('~') === -1).toBeTruthy(); + expect(untildify('~/test/dir/file.f').slice(-16)).toBe('/test/dir/file.f'); + expect(untildify('test/dir/file.f')).toBe('test/dir/file.f'); +}); diff --git a/test/unzip/unzip.js b/test6/unzip/unzip.js similarity index 100% rename from test/unzip/unzip.js rename to test6/unzip/unzip.js diff --git a/test6/unzip/unzip.test.js b/test6/unzip/unzip.test.js new file mode 100644 index 000000000..e3b88825d --- /dev/null +++ b/test6/unzip/unzip.test.js @@ -0,0 +1,10 @@ +const expect = require('expect'); +const unzip = require('./unzip.js'); + +test('Testing unzip', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof unzip === 'function').toBeTruthy(); + expect(unzip([['a', 1, true], ['b', 2, false]])).toEqual([['a', 'b'], [1, 2], [true, false]]); + expect(unzip([['a', 1, true], ['b', 2]])).toEqual([['a', 'b'], [1, 2], [true]]); +}); diff --git a/test/unzipWith/unzipWith.js b/test6/unzipWith/unzipWith.js similarity index 100% rename from test/unzipWith/unzipWith.js rename to test6/unzipWith/unzipWith.js diff --git a/test6/unzipWith/unzipWith.test.js b/test6/unzipWith/unzipWith.test.js new file mode 100644 index 000000000..40752b618 --- /dev/null +++ b/test6/unzipWith/unzipWith.test.js @@ -0,0 +1,11 @@ +const expect = require('expect'); +const unzipWith = require('./unzipWith.js'); + +test('Testing unzipWith', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof unzipWith === 'function').toBeTruthy(); + 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.js b/test6/validateNumber/validateNumber.js similarity index 100% rename from test/validateNumber/validateNumber.js rename to test6/validateNumber/validateNumber.js diff --git a/test6/validateNumber/validateNumber.test.js b/test6/validateNumber/validateNumber.test.js new file mode 100644 index 000000000..ef31971ae --- /dev/null +++ b/test6/validateNumber/validateNumber.test.js @@ -0,0 +1,20 @@ +const expect = require('expect'); +const validateNumber = require('./validateNumber.js'); + +test('Testing validateNumber', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof validateNumber === 'function').toBeTruthy(); + expect(validateNumber(9)).toBeTruthy(); + expect(validateNumber('234asd'.slice(0, 2))).toBeTruthy(); + expect(validateNumber(1232)).toBeTruthy(); + expect(validateNumber(1232 + 13423)).toBeTruthy(); + expect(validateNumber(1232 * 2342 * 123)).toBeTruthy(); + expect(validateNumber(1232.23423536)).toBeTruthy(); + expect(validateNumber('234asd')).toBeFalsy(); + expect(validateNumber('e234d')).toBeFalsy(); + expect(validateNumber(false)).toBeFalsy(); + expect(validateNumber(true)).toBeFalsy(); + expect(validateNumber(null)).toBeFalsy(); + expect(validateNumber(123 * 'asd')).toBeFalsy(); +}); diff --git a/test/when/when.js b/test6/when/when.js similarity index 100% rename from test/when/when.js rename to test6/when/when.js diff --git a/test/when/when.test.js b/test6/when/when.test.js similarity index 52% rename from test/when/when.test.js rename to test6/when/when.test.js index 1a814190f..154c84c4f 100644 --- a/test/when/when.test.js +++ b/test6/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) => { +test('Testing when', () => { //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'); + expect(typeof when === 'function').toBeTruthy(); const doubleEvenNumbers = when( (x) => x % 2 === 0, (x) => x * 2 ); - t.true(doubleEvenNumbers(2) === 4); - t.true(doubleEvenNumbers(1) === 1); - - t.end(); + expect(doubleEvenNumbers(2) === 4).toBeTruthy(); + expect(doubleEvenNumbers(1) === 1).toBeTruthy(); }); diff --git a/test/without/without.js b/test6/without/without.js similarity index 100% rename from test/without/without.js rename to test6/without/without.js diff --git a/test6/without/without.test.js b/test6/without/without.test.js new file mode 100644 index 000000000..88053f595 --- /dev/null +++ b/test6/without/without.test.js @@ -0,0 +1,17 @@ +const expect = require('expect'); +const without = require('./without.js'); + +test('Testing without', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof without === 'function').toBeTruthy(); + expect(without([2, 1, 2, 3], 1, 2)).toEqual([3]); + expect(without([])).toEqual([]); + expect(without([3, 1, true, '3', true], '3', true)).toEqual([3, 1]); + expect(without('string'.split(''), 's', 't', 'g')).toEqual(['r', 'i', 'n']); + expect(() => without()).toThrow(); + expect(() => without(null)).toThrow(); + expect(() => without(undefined)).toThrow(); + expect(() => without(123)).toThrow(); + expect(() => without({})).toThrow(); +}); diff --git a/test/words/words.js b/test6/words/words.js similarity index 100% rename from test/words/words.js rename to test6/words/words.js diff --git a/test6/words/words.test.js b/test6/words/words.test.js new file mode 100644 index 000000000..9d57bdf0e --- /dev/null +++ b/test6/words/words.test.js @@ -0,0 +1,17 @@ +const expect = require('expect'); +const words = require('./words.js'); + +test('Testing words', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof words === 'function').toBeTruthy(); + expect(words('I love javaScript!!')).toEqual(["I", "love", "javaScript"]); + expect(words('python, javaScript & coffee')).toEqual(["python", "javaScript", "coffee"]); + expect(Array.isArray(words('I love javaScript!!'))).toBeTruthy(); + expect(() => words()).toThrow(); + expect(() => words(null)).toThrow(); + expect(() => words(undefined)).toThrow(); + expect(() => words({})).toThrow(); + expect(() => words([])).toThrow(); + expect(() => words(1234)).toThrow(); +}); diff --git a/test/xProd/xProd.js b/test6/xProd/xProd.js similarity index 100% rename from test/xProd/xProd.js rename to test6/xProd/xProd.js diff --git a/test6/xProd/xProd.test.js b/test6/xProd/xProd.test.js new file mode 100644 index 000000000..9c94485c4 --- /dev/null +++ b/test6/xProd/xProd.test.js @@ -0,0 +1,9 @@ +const expect = require('expect'); +const xProd = require('./xProd.js'); + +test('Testing xProd', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof xProd === 'function').toBeTruthy(); + expect(xProd([1, 2], ['a', 'b'])).toEqual([[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']]); +}); diff --git a/test/yesNo/yesNo.js b/test6/yesNo/yesNo.js similarity index 100% rename from test/yesNo/yesNo.js rename to test6/yesNo/yesNo.js diff --git a/test6/yesNo/yesNo.test.js b/test6/yesNo/yesNo.test.js new file mode 100644 index 000000000..6947ca429 --- /dev/null +++ b/test6/yesNo/yesNo.test.js @@ -0,0 +1,20 @@ +const expect = require('expect'); +const yesNo = require('./yesNo.js'); + +test('Testing yesNo', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof yesNo === 'function').toBeTruthy(); + expect(yesNo('Y')).toBeTruthy(); + expect(yesNo('yes')).toBeTruthy(); + expect(yesNo('foo', true)).toBeTruthy(); + expect(yesNo('No')).toBeFalsy(); + expect(yesNo()).toBeFalsy(); + expect(yesNo(null)).toBeFalsy(); + expect(yesNo(undefined)).toBeFalsy(); + expect(yesNo([123, null])).toBeFalsy(); + expect(yesNo(['Yes', 'No'])).toBeFalsy(); + expect(yesNo({ 2: 'Yes' })).toBeFalsy(); + expect(yesNo(['Yes', 'No'], true)).toBeTruthy(); + expect(yesNo({ 2: 'Yes' }, true)).toBeTruthy(); +}); diff --git a/test/zip/zip.js b/test6/zip/zip.js similarity index 100% rename from test/zip/zip.js rename to test6/zip/zip.js diff --git a/test6/zip/zip.test.js b/test6/zip/zip.test.js new file mode 100644 index 000000000..7da9b8d65 --- /dev/null +++ b/test6/zip/zip.test.js @@ -0,0 +1,16 @@ +const expect = require('expect'); +const zip = require('./zip.js'); + +test('Testing zip', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof zip === 'function').toBeTruthy(); + expect(zip(['a', 'b'], [1, 2], [true, false])).toEqual([['a', 1, true], ['b', 2, false]]); + expect(zip(['a'], [1, 2], [true, false])).toEqual([['a', 1, true], [undefined, 2, false]]); + expect(zip()).toEqual([]); + expect(zip(123)).toEqual([]); + expect(Array.isArray(zip(['a', 'b'], [1, 2], [true, false]))).toBeTruthy(); + expect(Array.isArray(zip(['a'], [1, 2], [true, false]))).toBeTruthy(); + expect(() => zip(null)).toThrow(); + expect(() => zip(undefined)).toThrow(); +}); diff --git a/test/zipObject/zipObject.js b/test6/zipObject/zipObject.js similarity index 100% rename from test/zipObject/zipObject.js rename to test6/zipObject/zipObject.js diff --git a/test6/zipObject/zipObject.test.js b/test6/zipObject/zipObject.test.js new file mode 100644 index 000000000..de895be37 --- /dev/null +++ b/test6/zipObject/zipObject.test.js @@ -0,0 +1,17 @@ +const expect = require('expect'); +const zipObject = require('./zipObject.js'); + +test('Testing zipObject', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof zipObject === 'function').toBeTruthy(); + expect(zipObject(['a', 'b', 'c'], [1, 2])).toEqual({a: 1, b: 2, c: undefined}); + expect(zipObject(['a', 'b'], [1, 2, 3])).toEqual({a: 1, b: 2}); + expect(zipObject(['a', 'b', 'c'], 'string')).toEqual({ a: 's', b: 't', c: 'r' }); + expect(zipObject(['a'], 'string')).toEqual({ a: 's' }); + expect(() => zipObject()).toThrow(); + expect(() => zipObject(['string'], null)).toThrow(); + expect(() => zipObject(null, [1])).toThrow(); + expect(() => zipObject('string')).toThrow(); + expect(() => zipObject('test', 'string')).toThrow(); +}); diff --git a/test/zipWith/zipWith.js b/test6/zipWith/zipWith.js similarity index 100% rename from test/zipWith/zipWith.js rename to test6/zipWith/zipWith.js diff --git a/test6/zipWith/zipWith.test.js b/test6/zipWith/zipWith.test.js new file mode 100644 index 000000000..1c6f8199e --- /dev/null +++ b/test6/zipWith/zipWith.test.js @@ -0,0 +1,8 @@ +const expect = require('expect'); +const zipWith = require('./zipWith.js'); + +test('Testing zipWith', () => { + //For more information on all the methods supported by tape + //Please go to https://github.com/substack/tape + expect(typeof zipWith === 'function').toBeTruthy(); +}); \ No newline at end of file