diff options
| author | Florian Dold <florian.dold@gmail.com> | 2019-03-27 21:01:33 +0100 |
|---|---|---|
| committer | Florian Dold <florian.dold@gmail.com> | 2019-03-27 21:01:33 +0100 |
| commit | cc97a4dd2a967e1c2273bd5f4c5f49a5bf2e2585 (patch) | |
| tree | 92c5d88706a6ffc654d1b133618d357890e7096b /node_modules/es5-ext/test/object | |
| parent | 3771b4d6b67b34c130f3a9a1a15f42deefdb2eda (diff) | |
remove node_modules
Diffstat (limited to 'node_modules/es5-ext/test/object')
67 files changed, 0 insertions, 1411 deletions
diff --git a/node_modules/es5-ext/test/object/_iterate.js b/node_modules/es5-ext/test/object/_iterate.js deleted file mode 100644 index d7728f429..000000000 --- a/node_modules/es5-ext/test/object/_iterate.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var o = { raz: 1, dwa: 2, trzy: 3 } - , o2 = {}, o3 = {}, arr, i = -1; - - t = t("forEach"); - t(o, function (value, name, self, index) { - o2[name] = value; - a(index, ++i, "Index"); - a(self, o, "Self"); - a(this, o3, "Scope"); - }, o3); - a.deep(o2, o); - - arr = []; - o2 = {}; - i = -1; - t(o, function (value, name, self, index) { - arr.push(value); - o2[name] = value; - a(index, ++i, "Index"); - a(self, o, "Self"); - a(this, o3, "Scope"); - }, o3, function (a, b) { - return o[b] - o[a]; - }); - a.deep(o2, o, "Sort by Values: Content"); - a.deep(arr, [3, 2, 1], "Sort by Values: Order"); -}; diff --git a/node_modules/es5-ext/test/object/assign-deep.js b/node_modules/es5-ext/test/object/assign-deep.js deleted file mode 100644 index 962ac40df..000000000 --- a/node_modules/es5-ext/test/object/assign-deep.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var o1 = { a: 1, b: 2 }, o2 = { b: 3, c: 4 }; - - a(t(o1, o2), o1, "Returns self"); - a.deep(o1, { a: 1, b: 3, c: 4 }, "Single: content"); - - a.deep(t({}, o1, o2), { a: 1, b: 3, c: 4 }, "Multi argument"); - - var obj1 = { foo: { bar: 3, marko: true } } - , obj2 = { foo: { elo: 12, marko: false }, miszka: [23] }; - - var copyObj1 = JSON.parse(JSON.stringify(obj1)), copyObj2 = JSON.parse(JSON.stringify(obj2)); - a.deep(t({}, obj1, obj2), { foo: { bar: 3, marko: false, elo: 12 }, miszka: [23] }); - // Ensure it's side effects free - a.deep(obj1, copyObj1); - a.deep(obj2, copyObj2); - - obj1 = [{ foo: "bar" }]; - var assignedObj = []; - t(assignedObj, obj1); - a.deep(assignedObj, [{ foo: "bar" }]); - // Ensure array items are copied and not passed - a.not(assignedObj[0], obj1[0]); - a(t(true), true); -}; diff --git a/node_modules/es5-ext/test/object/assign/implement.js b/node_modules/es5-ext/test/object/assign/implement.js deleted file mode 100644 index c3e0396ba..000000000 --- a/node_modules/es5-ext/test/object/assign/implement.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -var isImplemented = require("../../../object/assign/is-implemented"); - -module.exports = function (a) { - a(isImplemented(), true); -}; diff --git a/node_modules/es5-ext/test/object/assign/index.js b/node_modules/es5-ext/test/object/assign/index.js deleted file mode 100644 index 10bb8f65d..000000000 --- a/node_modules/es5-ext/test/object/assign/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/object/assign/is-implemented.js b/node_modules/es5-ext/test/object/assign/is-implemented.js deleted file mode 100644 index 5003e7e93..000000000 --- a/node_modules/es5-ext/test/object/assign/is-implemented.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - a(typeof t(), "boolean"); -}; diff --git a/node_modules/es5-ext/test/object/assign/shim.js b/node_modules/es5-ext/test/object/assign/shim.js deleted file mode 100644 index 360749076..000000000 --- a/node_modules/es5-ext/test/object/assign/shim.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var o1 = { a: 1, b: 2 } - , o2 = { b: 3, c: 4 }; - - a(t(o1, o2), o1, "Returns self"); - a.deep(o1, { a: 1, b: 3, c: 4 }, "Single: content"); - - a.deep(t({}, o1, o2), { a: 1, b: 3, c: 4 }, "Multi argument"); -}; diff --git a/node_modules/es5-ext/test/object/clear.js b/node_modules/es5-ext/test/object/clear.js deleted file mode 100644 index 5735e7967..000000000 --- a/node_modules/es5-ext/test/object/clear.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -var isEmpty = require("../../object/is-empty"); - -module.exports = function (t, a) { - var x = {}; - a(t(x), x, "Empty: Returns same object"); - a(isEmpty(x), true, "Empty: Not changed"); - x.foo = "raz"; - x.bar = "dwa"; - a(t(x), x, "Same object"); - a(isEmpty(x), true, "Emptied"); -}; diff --git a/node_modules/es5-ext/test/object/compact.js b/node_modules/es5-ext/test/object/compact.js deleted file mode 100644 index 353f6f327..000000000 --- a/node_modules/es5-ext/test/object/compact.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var x = {}, y = {}, z; - z = t(x); - a.not(z, x, "Returns different object"); - a.deep(z, {}, "Empty on empty"); - - x = { foo: "bar", -a: 0, -b: false, -c: "", -d: "0", -e: null, -bar: y, - elo: undefined }; - z = t(x); - a.deep(z, { foo: "bar", a: 0, b: false, c: "", d: "0", bar: y }, - "Cleared null values"); -}; diff --git a/node_modules/es5-ext/test/object/compare.js b/node_modules/es5-ext/test/object/compare.js deleted file mode 100644 index 23cc51160..000000000 --- a/node_modules/es5-ext/test/object/compare.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var d = new Date(); - - a.ok(t(12, 3) > 0, "Numbers"); - a.ok(t(2, 13) < 0, "Numbers #2"); - a.ok(t("aaa", "aa") > 0, "Strings"); - a.ok(t("aa", "ab") < 0, "Strings #2"); - a(t("aa", "aa"), 0, "Strings same"); - a(t(d, new Date(d.getTime())), 0, "Same date"); - a.ok(t(d, new Date(d.getTime() + 1)) < 0, "Different date"); -}; diff --git a/node_modules/es5-ext/test/object/copy-deep.js b/node_modules/es5-ext/test/object/copy-deep.js deleted file mode 100644 index 93813830f..000000000 --- a/node_modules/es5-ext/test/object/copy-deep.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; - -var stringify = JSON.stringify; - -module.exports = function (t, a) { - var o = { 1: "raz", 2: "dwa", 3: "trzy" }, no = t(o); - - a.not(no, o, "Return different object"); - a(stringify(no), stringify(o), "Match properties and values"); - - o = { - foo: "bar", - raz: { - dwa: "dwa", - trzy: { cztery: "pięć", sześć: "siedem" }, - osiem: {}, - dziewięć: function () {} - }, - dziesięć: 10, - jedenaście: ["raz", ["dwa", "trzy", { elo: "true" }]] - }; - o.raz.rec = o; - - no = t(o); - a.not(o.raz, no.raz, "Deep"); - a.not(o.raz.trzy, no.raz.trzy, "Deep #2"); - a(stringify(o.raz.trzy), stringify(no.raz.trzy), "Deep content"); - a(no.raz.rec, no, "Recursive"); - a.not(o.raz.osiem, no.raz.osiem, "Empty object"); - a(o.raz["dziewięć"], no.raz["dziewięć"], "Function"); - a.not(o["jedenaście"], no["jedenaście"]); - a.not(o["jedenaście"][1], no["jedenaście"][1]); - a.not(o["jedenaście"][1][2], no["jedenaście"][1][2]); - a(t(true), true); -}; diff --git a/node_modules/es5-ext/test/object/copy.js b/node_modules/es5-ext/test/object/copy.js deleted file mode 100644 index a5e2c3480..000000000 --- a/node_modules/es5-ext/test/object/copy.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; - -var stringify = JSON.stringify; - -module.exports = function (t, a) { - var o = { 1: "raz", 2: "dwa", 3: "trzy" }, no = t(o); - - a.not(no, o, "Return different object"); - a(stringify(no), stringify(o), "Match properties and values"); - - o = { - foo: "bar", - raz: { - dwa: "dwa", - trzy: { cztery: "pięć", sześć: "siedem" }, - osiem: {}, - dziewięć: function () {} - }, - dziesięć: 10 - }; - o.raz.rec = o; - - no = t(o); - a(o.raz, no.raz, "Shallow"); - - a.deep(t(o, ["foo"]), { foo: "bar" }); - a.deep(t(Object.create(o), ["foo"]), { foo: "bar" }); - a.deep(t(o, ["foo", "habla"]), { foo: "bar" }); - a.deep(t(o, ["foo", "habla"], { ensure: true }), { foo: "bar", habla: undefined }); -}; diff --git a/node_modules/es5-ext/test/object/count.js b/node_modules/es5-ext/test/object/count.js deleted file mode 100644 index ec1c50450..000000000 --- a/node_modules/es5-ext/test/object/count.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - a(t({}), 0, "Empty"); - a(t({ raz: 1, dwa: null, trzy: undefined, cztery: 0 }), 4, - "Some properties"); - a(t(Object.defineProperties({}, { - raz: { value: "raz" }, - dwa: { value: "dwa", enumerable: true } - })), 1, "Some properties hidden"); -}; diff --git a/node_modules/es5-ext/test/object/create.js b/node_modules/es5-ext/test/object/create.js deleted file mode 100644 index c9f3029f6..000000000 --- a/node_modules/es5-ext/test/object/create.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; - -var setPrototypeOf = require("../../object/set-prototype-of") - - , getPrototypeOf = Object.getPrototypeOf; - -module.exports = function (t, a) { - var x = {}, obj; - - a(getPrototypeOf(t(x)), x, "Normal object"); - a(getPrototypeOf(t(null)), - (setPrototypeOf && setPrototypeOf.nullPolyfill) || null, "Null"); - - a.h1("Properties"); - a.h2("Normal object"); - a(getPrototypeOf(obj = t(x, { foo: { value: "bar" } })), x, "Prototype"); - a(obj.foo, "bar", "Property"); - a.h2("Null"); - a(getPrototypeOf(obj = t(null, { foo: { value: "bar2" } })), - (setPrototypeOf && setPrototypeOf.nullPolyfill) || null, "Prototype"); - a(obj.foo, "bar2", "Property"); -}; diff --git a/node_modules/es5-ext/test/object/ensure-array.js b/node_modules/es5-ext/test/object/ensure-array.js deleted file mode 100644 index fd3c32c97..000000000 --- a/node_modules/es5-ext/test/object/ensure-array.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var arr = []; - a(t(arr), arr, "Array"); - a(t(""), "", "String"); - var args = (function () { - return arguments; - }()); - a(t(args), args, "Arguments"); - var arrayLike = { length: 0 }; - a(t(arrayLike), arrayLike, "Array like"); - a.throws( - function () { - t(function () {}); - }, - TypeError, - "Function" - ); - a.throws( - function () { - t({}); - }, - TypeError, - "Plain object" - ); - a.throws( - function () { - t(/raz/); - }, - TypeError, - "Regexp" - ); - a.throws( - function () { - t(); - }, - TypeError, - "No argument" - ); - a.throws( - function () { - t(null); - }, - TypeError, - "Null" - ); - a.throws( - function () { - t(undefined); - }, - TypeError, - "Undefined" - ); -}; diff --git a/node_modules/es5-ext/test/object/ensure-finite-number.js b/node_modules/es5-ext/test/object/ensure-finite-number.js deleted file mode 100644 index f1e6166b5..000000000 --- a/node_modules/es5-ext/test/object/ensure-finite-number.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - a.throws( - function () { - t(undefined); - }, - TypeError, - "Undefined" - ); - a.throws( - function () { - t(null); - }, - TypeError, - "Null" - ); - a(t(0), 0, "Zero"); - a.throws( - function () { - t(NaN); - }, - TypeError, - "NaN" - ); - a.throws( - function () { - t(Infinity); - }, - TypeError, - "Infinity" - ); - a(t(12), 12, "Number"); - a(t(false), 0, "Boolean"); - a(t(new Date(1000000)), 1000000, "Date"); - a(t(new Number(2)), 2, "Number object"); - a.throws( - function () { - t("asdfaf"); - }, - TypeError, - "String" - ); - a(t(""), 0, "Empty String"); - if (typeof Symbol === "function") { - a.throws( - function () { - t(Symbol("test")); - }, - TypeError, - "Symbol" - ); - } -}; diff --git a/node_modules/es5-ext/test/object/ensure-natural-number-value.js b/node_modules/es5-ext/test/object/ensure-natural-number-value.js deleted file mode 100644 index 9aaae370a..000000000 --- a/node_modules/es5-ext/test/object/ensure-natural-number-value.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - a.throws(function () { - t(undefined); -}, TypeError, "Undefined"); - a.throws(function () { - t(null); -}, TypeError, "Null"); - a(t(2), 2, "Number"); - a.throws(function () { - t(-2); -}, TypeError, "Negative"); - a.throws(function () { - t(2.34); -}, TypeError, "Float"); - a(t("23"), 23, "Numeric string"); - a.throws(function () { - t(NaN); -}, TypeError, "NaN"); - a.throws(function () { - t(Infinity); -}, TypeError, "Infinity"); -}; diff --git a/node_modules/es5-ext/test/object/ensure-natural-number.js b/node_modules/es5-ext/test/object/ensure-natural-number.js deleted file mode 100644 index ff0e836af..000000000 --- a/node_modules/es5-ext/test/object/ensure-natural-number.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - a.throws(function () { - t(undefined); -}, TypeError, "Undefined"); - a(t(null), 0, "Null"); - a(t(2), 2, "Number"); - a.throws(function () { - t(-2); -}, TypeError, "Negative"); - a.throws(function () { - t(2.34); -}, TypeError, "Float"); - a(t("23"), 23, "Numeric string"); - a.throws(function () { - t(NaN); -}, TypeError, "NaN"); - a.throws(function () { - t(Infinity); -}, TypeError, "Infinity"); -}; diff --git a/node_modules/es5-ext/test/object/ensure-promise.js b/node_modules/es5-ext/test/object/ensure-promise.js deleted file mode 100644 index 1af15bab7..000000000 --- a/node_modules/es5-ext/test/object/ensure-promise.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var promise; - a.throws(function () { - t(); -}, TypeError); - a.throws(function () { - t(null); -}, TypeError); - a.throws(function () { - t("promise"); -}, TypeError); - a.throws(function () { - t({}); -}, TypeError); - a.throws(function () { - t(function () {}); -}, TypeError); - a.throws(function () { - t({ then: {} }); -}, TypeError); - promise = { then: function () {} }; - a(t(promise), promise); - promise = function () {}; - promise.then = {}; - a.throws(function () { - t(promise); -}, TypeError); - promise.then = function () {}; - a(t(promise), promise); -}; diff --git a/node_modules/es5-ext/test/object/eq.js b/node_modules/es5-ext/test/object/eq.js deleted file mode 100644 index 8cad90aeb..000000000 --- a/node_modules/es5-ext/test/object/eq.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var o = {}; - a(t(o, {}), false, "Different objects"); - a(t(o, o), true, "Same objects"); - a(t("1", "1"), true, "Same primitive"); - a(t("1", 1), false, "Different primitive types"); - a(t(NaN, NaN), true, "NaN"); - a(t(0, 0), true, "0,0"); - a(t(0, -0), true, "0,-0"); -}; diff --git a/node_modules/es5-ext/test/object/every.js b/node_modules/es5-ext/test/object/every.js deleted file mode 100644 index 7e837d22e..000000000 --- a/node_modules/es5-ext/test/object/every.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -var o = { 1: 1, 2: 2, 3: 3 }; - -module.exports = function (t, a) { - var o2 = {}; - t(o, function (value, name) { - o2[name] = value; - return true; - }); - a(JSON.stringify(o2), JSON.stringify(o), "Iterates"); - - a(t(o, function () { - return true; - }), true, "Succeeds"); - - a(t(o, function () { - return false; - }), false, "Fails"); - -}; diff --git a/node_modules/es5-ext/test/object/filter.js b/node_modules/es5-ext/test/object/filter.js deleted file mode 100644 index c714d2373..000000000 --- a/node_modules/es5-ext/test/object/filter.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - a.deep(t({ 1: 1, 2: 2, 3: 3, 4: 4 }, - function (value) { - return Boolean(value % 2); -}), { 1: 1, 3: 3 }); -}; diff --git a/node_modules/es5-ext/test/object/find-key.js b/node_modules/es5-ext/test/object/find-key.js deleted file mode 100644 index d4a578ff3..000000000 --- a/node_modules/es5-ext/test/object/find-key.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -var o = { 1: 1, 2: 2, 3: 3 }; - -module.exports = function (t, a) { - var o2 = {}, i = 0; - t(o, function (value, name) { - o2[name] = value; - return false; - }); - a(JSON.stringify(o2), JSON.stringify(o), "Iterates"); - - a(t(o, function () { - ++i; - return true; - }), "1", "Finds"); - a(i, 1, "Stops iteration after condition is met"); - - a(t(o, function () { - return false; - }), undefined, "Fails"); - -}; diff --git a/node_modules/es5-ext/test/object/find.js b/node_modules/es5-ext/test/object/find.js deleted file mode 100644 index eea512470..000000000 --- a/node_modules/es5-ext/test/object/find.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -var o = { 1: 1, 2: 2, 3: 3 }; - -module.exports = function (t, a) { - var o2 = {}, i = 0; - t(o, function (value, name) { - o2[name] = value; - return false; - }); - a(JSON.stringify(o2), JSON.stringify(o), "Iterates"); - - a(t(o, function () { - ++i; - return true; - }), 1, "Finds"); - a(i, 1, "Stops iteration after condition is met"); - - a(t(o, function () { - return false; - }), undefined, "Fails"); - -}; diff --git a/node_modules/es5-ext/test/object/first-key.js b/node_modules/es5-ext/test/object/first-key.js deleted file mode 100644 index 6010ba11c..000000000 --- a/node_modules/es5-ext/test/object/first-key.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var x = {}, y = Object.create(null); - a(t(x), null, "Normal: Empty"); - a(t(y), null, "Null extension: Empty"); - x.foo = "raz"; - x.bar = 343; - a(["foo", "bar"].indexOf(t(x)) !== -1, true, "Normal"); - y.elo = "foo"; - y.mar = "wew"; - a(["elo", "mar"].indexOf(t(y)) !== -1, true, "Null extension"); -}; diff --git a/node_modules/es5-ext/test/object/flatten.js b/node_modules/es5-ext/test/object/flatten.js deleted file mode 100644 index 277a97cfd..000000000 --- a/node_modules/es5-ext/test/object/flatten.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - a.deep(t({ a: { aa: 1, ab: 2 }, b: { ba: 3, bb: 4 } }), - { aa: 1, ab: 2, ba: 3, bb: 4 }); -}; diff --git a/node_modules/es5-ext/test/object/for-each.js b/node_modules/es5-ext/test/object/for-each.js deleted file mode 100644 index 97c6399a8..000000000 --- a/node_modules/es5-ext/test/object/for-each.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var o = { raz: 1, dwa: 2, trzy: 3 } - , o2 = {}; - a(t(o, function (value, name) { - o2[name] = value; - }), undefined, "Return"); - a.deep(o2, o); -}; diff --git a/node_modules/es5-ext/test/object/get-property-names.js b/node_modules/es5-ext/test/object/get-property-names.js deleted file mode 100644 index a1d6377fe..000000000 --- a/node_modules/es5-ext/test/object/get-property-names.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var o = { first: 1, second: 4 }, r1, r2; - o = Object.create(o, { - third: { value: null } - }); - o.first = 2; - o = Object.create(o); - o.fourth = 3; - - r1 = t(o); - r1.sort(); - r2 = ["first", "second", "third", "fourth"] - .concat(Object.getOwnPropertyNames(Object.prototype)); - r2.sort(); - a.deep(r1, r2); -}; diff --git a/node_modules/es5-ext/test/object/is-array-like.js b/node_modules/es5-ext/test/object/is-array-like.js deleted file mode 100644 index 50f5ce596..000000000 --- a/node_modules/es5-ext/test/object/is-array-like.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - a(t([]), true, "Array"); - a(t(""), true, "String"); - a( - t( - (function () { - return arguments; - })() - ), - true, - "Arguments" - ); - a(t({ length: 0 }), true, "List object"); - a(t(function () {}), false, "Function"); - a(t({}), false, "Plain object"); - a(t(/raz/), false, "Regexp"); - a(t(), false, "No argument"); - a(t(null), false, "Null"); - a(t(undefined), false, "Undefined"); -}; diff --git a/node_modules/es5-ext/test/object/is-callable.js b/node_modules/es5-ext/test/object/is-callable.js deleted file mode 100644 index 415023e39..000000000 --- a/node_modules/es5-ext/test/object/is-callable.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - a(t(function () {}), true, "Function"); - a(t({}), false, "Object"); - a(t(), false, "Undefined"); - a(t(null), false, "Null"); -}; diff --git a/node_modules/es5-ext/test/object/is-copy-deep.js b/node_modules/es5-ext/test/object/is-copy-deep.js deleted file mode 100644 index 9c8ad9257..000000000 --- a/node_modules/es5-ext/test/object/is-copy-deep.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var x, y; - - a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 3 }), true, "Same"); - a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 4 }), false, - "Different property value"); - a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2 }), false, - "Property only in source"); - a(t({ 1: 1, 2: 2 }, { 1: 1, 2: 2, 3: 4 }), false, - "Property only in target"); - - a(t("raz", "dwa"), false, "String: diff"); - a(t("raz", "raz"), true, "String: same"); - a(t("32", 32), false, "String & Number"); - - a(t([1, "raz", true], [1, "raz", true]), true, "Array: same"); - a(t([1, "raz", undefined], [1, "raz"]), false, "Array: diff"); - a(t(["foo"], ["one"]), false, "Array: One value comparision"); - - x = { foo: { bar: { mar: {} } } }; - y = { foo: { bar: { mar: {} } } }; - a(t(x, y), true, "Deep"); - - a(t({ foo: { bar: { mar: "foo" } } }, { foo: { bar: { mar: {} } } }), - false, "Deep: false"); - - x = { foo: { bar: { mar: {} } } }; - x.rec = { foo: x }; - - y = { foo: { bar: { mar: {} } } }; - y.rec = { foo: x }; - - a(t(x, y), true, "Object: Infinite Recursion: Same #1"); - - x.rec.foo = y; - a(t(x, y), true, "Object: Infinite Recursion: Same #2"); - - x.rec.foo = x; - y.rec.foo = y; - a(t(x, y), true, "Object: Infinite Recursion: Same #3"); - - y.foo.bar.mar = "raz"; - a(t(x, y), false, "Object: Infinite Recursion: Diff"); -}; diff --git a/node_modules/es5-ext/test/object/is-copy.js b/node_modules/es5-ext/test/object/is-copy.js deleted file mode 100644 index 6052bb051..000000000 --- a/node_modules/es5-ext/test/object/is-copy.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 3 }), true, "Same"); - a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2, 3: 4 }), false, - "Different property value"); - a(t({ 1: 1, 2: 2, 3: 3 }, { 1: 1, 2: 2 }), false, - "Property only in source"); - a(t({ 1: 1, 2: 2 }, { 1: 1, 2: 2, 3: 4 }), false, - "Property only in target"); - - a(t("raz", "dwa"), false, "String: diff"); - a(t("raz", "raz"), true, "String: same"); - a(t("32", 32), false, "String & Number"); - - a(t([1, "raz", true], [1, "raz", true]), true, "Array: same"); - a(t([1, "raz", undefined], [1, "raz"]), false, "Array: diff"); -}; diff --git a/node_modules/es5-ext/test/object/is-empty.js b/node_modules/es5-ext/test/object/is-empty.js deleted file mode 100644 index 067b1621f..000000000 --- a/node_modules/es5-ext/test/object/is-empty.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - a(t({}), true, "Empty"); - a(t({ 1: 1 }), false, "Not empty"); -}; diff --git a/node_modules/es5-ext/test/object/is-finite-number.js b/node_modules/es5-ext/test/object/is-finite-number.js deleted file mode 100644 index 6475fb661..000000000 --- a/node_modules/es5-ext/test/object/is-finite-number.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - a(t(undefined), false, "Undefined"); - a(t(null), false, "Null"); - a(t(0), true, "Zero"); - a(t(NaN), false, "NaN"); - a(t(Infinity), false, "Infinity"); - a(t(12), true, "Number"); - a(t(false), true, "Boolean"); - a(t(new Date()), true, "Date"); - a(t(new Number(2)), true, "Number object"); - a(t("asdfaf"), false, "String"); - a(t(""), true, "Empty String"); - if (typeof Symbol === "function") { - a(t(Symbol("test")), false, "Symbol"); - } -}; diff --git a/node_modules/es5-ext/test/object/is-number-value.js b/node_modules/es5-ext/test/object/is-number-value.js deleted file mode 100644 index 2c09d2517..000000000 --- a/node_modules/es5-ext/test/object/is-number-value.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - a(t(undefined), false, "Undefined"); - a(t(null), false, "Null"); - a(t(0), true, "Zero"); - a(t(NaN), false, "NaN"); - a(t(Infinity), true, "Infinity"); - a(t(12), true, "Number"); - a(t(false), true, "Boolean"); - a(t(new Date()), true, "Date"); - a(t(new Number(2)), true, "Number object"); - a(t("asdfaf"), false, "String"); - a(t(""), true, "Empty String"); - if (typeof Symbol === "function") { - a(t(Symbol("test")), false, "Symbol"); - } -}; diff --git a/node_modules/es5-ext/test/object/is-object.js b/node_modules/es5-ext/test/object/is-object.js deleted file mode 100644 index 0b8359978..000000000 --- a/node_modules/es5-ext/test/object/is-object.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - a(t("arar"), false, "String"); - a(t(12), false, "Number"); - a(t(true), false, "Boolean"); - a(t(null), false, "Null"); - a(t(new Date()), true, "Date"); - a(t(new String("raz")), true, "String object"); - a(t({}), true, "Plain object"); - a(t(/a/), true, "Regular expression"); - a(t(function () {}), true, "Function"); -}; diff --git a/node_modules/es5-ext/test/object/is-plain-function.js b/node_modules/es5-ext/test/object/is-plain-function.js deleted file mode 100644 index 9c1f5ed38..000000000 --- a/node_modules/es5-ext/test/object/is-plain-function.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; - -var setPrototypeOf = require("../../object/set-prototype-of"); - -module.exports = function (t, a) { - a(t(function () {}), true, "Function"); - a(t({}), false, "Object"); - a(t(), false, "Undefined"); - a(t(null), false, "Null"); - if (setPrototypeOf) { - a( - t(Object.setPrototypeOf(function () {}, Object.prototype)), - false, - "Function with non-function prototype" - ); - } - var arrowfn; - try { - arrowfn = eval("(() => {})"); - } catch (e) {} - if (arrowfn) { - a(t(arrowfn), true, "Arrow function"); - } - - var classFn; - try { - classFn = eval("(class {})"); - } catch (e) {} - if (classFn) { - a(t(classFn), false, "Class"); - } - - var commentedClassFn; - try { - // Follows issue reported to ljhard/is-callable project: - // https://github.com/ljharb/is-callable/issues/4 - commentedClassFn = eval("(class/*kkk*/\n//blah\n Bar\n//blah\n {})"); - } catch (e) {} - if (commentedClassFn) { - a(t(commentedClassFn, false, "Class"), false, "Class with comments"); - } -}; diff --git a/node_modules/es5-ext/test/object/is-plain-object.js b/node_modules/es5-ext/test/object/is-plain-object.js deleted file mode 100644 index 7324438d9..000000000 --- a/node_modules/es5-ext/test/object/is-plain-object.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - a(t({}), true, "Empty {} is plain object"); - a(t({ a: true }), true, "{} with property is plain object"); - a(t({ prototype: 1, constructor: 2, __proto__: 3 }), true, - "{} with any property keys is plain object"); - a(t(null), false, "Null is not plain object"); - a(t("string"), false, "Primitive is not plain object"); - a(t(function () {}), false, "Function is not plain object"); - a(t(Object.create({})), false, - "Object whose prototype is not Object.prototype is not plain object"); - a(t(Object.create(Object.prototype)), true, - "Object whose prototype is Object.prototype is plain object"); - a(t(Object.create(null)), true, - "Object whose prototype is null is plain object"); - a(t(Object.prototype), false, "Object.prototype"); -}; diff --git a/node_modules/es5-ext/test/object/is-promise.js b/node_modules/es5-ext/test/object/is-promise.js deleted file mode 100644 index 18bf934d8..000000000 --- a/node_modules/es5-ext/test/object/is-promise.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var promise; - a(t(), false); - a(t(null), false); - a(t("promise"), false); - a(t({}), false); - a(t(function () {}), false); - a(t({ then: {} }), false); - a(t({ then: function () {} }), true); - promise = function () {}; - promise.then = {}; - a(t(promise), false); - promise.then = function () {}; - a(t(promise), true); -}; diff --git a/node_modules/es5-ext/test/object/is-value.js b/node_modules/es5-ext/test/object/is-value.js deleted file mode 100644 index c97722d0a..000000000 --- a/node_modules/es5-ext/test/object/is-value.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - a(t(), false); - a(t(undefined), false); - a(t(null), false); - a(t(NaN), true); - a(t(0), true); - a(t(false), true); - a(t("null"), true); - a(t(""), true); - a(t({}), true); - a(t(Object.prototype), true); -}; diff --git a/node_modules/es5-ext/test/object/is.js b/node_modules/es5-ext/test/object/is.js deleted file mode 100644 index c94ed41c7..000000000 --- a/node_modules/es5-ext/test/object/is.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var o = {}; - a(t(o, {}), false, "Different objects"); - a(t(o, o), true, "Same objects"); - a(t("1", "1"), true, "Same primitive"); - a(t("1", 1), false, "Different primitive types"); - a(t(NaN, NaN), true, "NaN"); - a(t(0, 0), true, "0,0"); - a(t(0, -0), false, "0,-0"); -}; diff --git a/node_modules/es5-ext/test/object/key-of.js b/node_modules/es5-ext/test/object/key-of.js deleted file mode 100644 index bf10ca03b..000000000 --- a/node_modules/es5-ext/test/object/key-of.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var x = {}, y = {} - , o = { foo: "bar", raz: x, trzy: "cztery", five: "6" }; - - a(t(o, "bar"), "foo", "First property"); - a(t(o, 6), null, "Primitive that's not there"); - a(t(o, x), "raz", "Object"); - a(t(o, y), null, "Object that's not there"); - a(t(o, "6"), "five", "Last property"); -}; diff --git a/node_modules/es5-ext/test/object/keys/implement.js b/node_modules/es5-ext/test/object/keys/implement.js deleted file mode 100644 index 3134886dc..000000000 --- a/node_modules/es5-ext/test/object/keys/implement.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -var isImplemented = require("../../../object/keys/is-implemented"); - -module.exports = function (a) { a(isImplemented(), true); }; diff --git a/node_modules/es5-ext/test/object/keys/index.js b/node_modules/es5-ext/test/object/keys/index.js deleted file mode 100644 index 10bb8f65d..000000000 --- a/node_modules/es5-ext/test/object/keys/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./shim"); diff --git a/node_modules/es5-ext/test/object/keys/is-implemented.js b/node_modules/es5-ext/test/object/keys/is-implemented.js deleted file mode 100644 index 566411ce2..000000000 --- a/node_modules/es5-ext/test/object/keys/is-implemented.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { a(typeof t(), "boolean"); }; diff --git a/node_modules/es5-ext/test/object/keys/shim.js b/node_modules/es5-ext/test/object/keys/shim.js deleted file mode 100644 index dc09f46bd..000000000 --- a/node_modules/es5-ext/test/object/keys/shim.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - a.deep(t({ foo: "bar" }), ["foo"], "Object"); - a.deep(t("raz"), ["0", "1", "2"], "Primitive"); - a.throws(function () { t(); }, TypeError, "Undefined"); - a.throws(function () { t(null); }, TypeError, "Undefined"); -}; diff --git a/node_modules/es5-ext/test/object/map-keys.js b/node_modules/es5-ext/test/object/map-keys.js deleted file mode 100644 index 4598db21a..000000000 --- a/node_modules/es5-ext/test/object/map-keys.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - a.deep(t({ 1: 1, 2: 2, 3: 3 }, function (key, value) { - return "x" + (key + value); - }), { x11: 1, x22: 2, x33: 3 }); -}; diff --git a/node_modules/es5-ext/test/object/map.js b/node_modules/es5-ext/test/object/map.js deleted file mode 100644 index 78c1ed346..000000000 --- a/node_modules/es5-ext/test/object/map.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var obj = { 1: 1, 2: 2, 3: 3 }; - a.deep(t(obj, function (value, key, context) { - a(context, obj, "Context argument"); - return (value + 1) + key; - }), { 1: "21", 2: "32", 3: "43" }); -}; diff --git a/node_modules/es5-ext/test/object/mixin-prototypes.js b/node_modules/es5-ext/test/object/mixin-prototypes.js deleted file mode 100644 index 8745d9779..000000000 --- a/node_modules/es5-ext/test/object/mixin-prototypes.js +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var o, o1, o2, x, y = {}, z = {}; - o = { inherited: true, visible: 23 }; - o1 = Object.create(o); - o1.visible = z; - o1.nonremovable = "raz"; - Object.defineProperty(o1, "hidden", { value: "hidden" }); - - o2 = Object.defineProperties({}, { nonremovable: { value: y } }); - o2.other = "other"; - - try { - t(o2, o1); -} catch (ignore) {} - - a(o2.visible, z, "Enumerable"); - a(o1.hidden, "hidden", "Not Enumerable"); - a(o2.propertyIsEnumerable("visible"), true, "Enumerable is enumerable"); - a(o2.propertyIsEnumerable("hidden"), false, - "Not enumerable is not enumerable"); - - a(o2.inherited, true, "Extend deep"); - - a(o2.nonremovable, y, "Do not overwrite non configurable"); - a(o2.other, "other", "Own kept"); - - x = {}; - t(x, o2); - try { - t(x, o1); -} catch (ignore) {} - - a(x.visible, z, "Enumerable"); - a(x.hidden, "hidden", "Not Enumerable"); - a(x.propertyIsEnumerable("visible"), true, "Enumerable is enumerable"); - a(x.propertyIsEnumerable("hidden"), false, - "Not enumerable is not enumerable"); - - a(x.inherited, true, "Extend deep"); - - a(x.nonremovable, y, "Ignored non configurable"); - a(x.other, "other", "Other"); - - x.visible = 3; - a(x.visible, 3, "Writable is writable"); - - x = {}; - t(x, o1); - a.throws(function () { - x.hidden = 3; - }, "Not writable is not writable"); - - x = {}; - t(x, o1); - delete x.visible; - a.ok(!x.hasOwnProperty("visible"), "Configurable is configurable"); - - x = {}; - t(x, o1); - a.throws(function () { - delete x.hidden; - }, "Not configurable is not configurable"); - - x = Object.defineProperty({}, "foo", - { configurable: false, writable: true, enumerable: false, value: "bar" }); - - try { - t(x, { foo: "lorem" }); -} catch (ignore) {} - a(x.foo, "bar", "Writable, not enumerable"); -}; diff --git a/node_modules/es5-ext/test/object/mixin.js b/node_modules/es5-ext/test/object/mixin.js deleted file mode 100644 index d1905c17c..000000000 --- a/node_modules/es5-ext/test/object/mixin.js +++ /dev/null @@ -1,75 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var o, o1, o2, x, y = {}, z = {}; - o = { inherited: true }; - o1 = Object.create(o); - o1.visible = z; - o1.nonremovable = "raz"; - Object.defineProperty(o1, "hidden", { value: "hidden" }); - - o2 = Object.defineProperties({}, { nonremovable: { value: y } }); - o2.other = "other"; - - try { - t(o2, o1); -} catch (ignore) {} - - a(o2.visible, z, "Enumerable"); - a(o1.hidden, "hidden", "Not Enumerable"); - a(o2.propertyIsEnumerable("visible"), true, "Enumerable is enumerable"); - a(o2.propertyIsEnumerable("hidden"), false, - "Not enumerable is not enumerable"); - - a(o2.hasOwnProperty("inherited"), false, "Extend only own"); - a(o2.inherited, undefined, "Extend ony own: value"); - - a(o2.nonremovable, y, "Do not overwrite non configurable"); - a(o2.other, "other", "Own kept"); - - x = {}; - t(x, o2); - try { - t(x, o1); -} catch (ignore) {} - - a(x.visible, z, "Enumerable"); - a(x.hidden, "hidden", "Not Enumerable"); - a(x.propertyIsEnumerable("visible"), true, "Enumerable is enumerable"); - a(x.propertyIsEnumerable("hidden"), false, - "Not enumerable is not enumerable"); - - a(x.hasOwnProperty("inherited"), false, "Extend only own"); - a(x.inherited, undefined, "Extend ony own: value"); - - a(x.nonremovable, y, "Ignored non configurable"); - a(x.other, "other", "Other"); - - x.visible = 3; - a(x.visible, 3, "Writable is writable"); - - x = {}; - t(x, o1); - a.throws(function () { - x.hidden = 3; - }, "Not writable is not writable"); - - x = {}; - t(x, o1); - delete x.visible; - a.ok(!x.hasOwnProperty("visible"), "Configurable is configurable"); - - x = {}; - t(x, o1); - a.throws(function () { - delete x.hidden; - }, "Not configurable is not configurable"); - - x = Object.defineProperty({}, "foo", - { configurable: false, writable: true, enumerable: false, value: "bar" }); - - try { - t(x, { foo: "lorem" }); -} catch (ignore) {} - a(x.foo, "bar", "Writable, not enumerable"); -}; diff --git a/node_modules/es5-ext/test/object/normalize-options.js b/node_modules/es5-ext/test/object/normalize-options.js deleted file mode 100644 index 028864fec..000000000 --- a/node_modules/es5-ext/test/object/normalize-options.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; - -var create = Object.create, defineProperty = Object.defineProperty; - -module.exports = function (t, a) { - var x = { foo: "raz", bar: "dwa" }, y; - y = t(x); - a.not(y, x, "Returns copy"); - a.deep(y, x, "Plain"); - - x = { raz: "one", dwa: "two" }; - defineProperty(x, "get", { - configurable: true, - enumerable: true, - get: function () { - return this.dwa; -} - }); - x = create(x); - x.trzy = "three"; - x.cztery = "four"; - x = create(x); - x.dwa = "two!"; - x.trzy = "three!"; - x.piec = "five"; - x.szesc = "six"; - - a.deep(t(x), { raz: "one", -dwa: "two!", -trzy: "three!", -cztery: "four", - piec: "five", -szesc: "six", -get: "two!" }, "Deep object"); - - a.deep(t({ marko: "raz", raz: "foo" }, x, { szesc: "elo", siedem: "bibg" }), - { marko: "raz", -raz: "one", -dwa: "two!", -trzy: "three!", -cztery: "four", - piec: "five", -szesc: "elo", -siedem: "bibg", -get: "two!" }, "Multiple options"); -}; diff --git a/node_modules/es5-ext/test/object/primitive-set.js b/node_modules/es5-ext/test/object/primitive-set.js deleted file mode 100644 index b5083d5cc..000000000 --- a/node_modules/es5-ext/test/object/primitive-set.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var getPropertyNames = require("../../object/get-property-names") - , isPlainObject = require("../../object/is-plain-object"); - -module.exports = function (t, a) { - var x = t(); - a(isPlainObject(x), true, "Plain object"); - a.deep(getPropertyNames(x), [], "No properties"); - x.foo = "bar"; - a.deep(getPropertyNames(x), ["foo"], "Extensible"); - - a.deep(t("raz", "dwa", 3), { raz: true, dwa: true, 3: true }, - "Arguments handling"); -}; diff --git a/node_modules/es5-ext/test/object/safe-traverse.js b/node_modules/es5-ext/test/object/safe-traverse.js deleted file mode 100644 index acf49c0ed..000000000 --- a/node_modules/es5-ext/test/object/safe-traverse.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var obj = { foo: { bar: { lorem: 12 } } }; - a(t(obj), obj, "No props"); - a(t(obj, "foo"), obj.foo, "One"); - a(t(obj, "raz"), undefined, "One: Fail"); - a(t(obj, "foo", "bar"), obj.foo.bar, "Two"); - a(t(obj, "dsd", "raz"), undefined, "Two: Fail #1"); - a(t(obj, "foo", "raz"), undefined, "Two: Fail #2"); - a(t(obj, "foo", "bar", "lorem"), obj.foo.bar.lorem, "Three"); - a(t(obj, "dsd", "raz", "fef"), undefined, "Three: Fail #1"); - a(t(obj, "foo", "raz", "asdf"), undefined, "Three: Fail #2"); - a(t(obj, "foo", "bar", "asd"), undefined, "Three: Fail #3"); -}; diff --git a/node_modules/es5-ext/test/object/serialize.js b/node_modules/es5-ext/test/object/serialize.js deleted file mode 100644 index f0ca800cc..000000000 --- a/node_modules/es5-ext/test/object/serialize.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var fn = function (raz, dwa) { - return raz + dwa; - }; - a(t(), "undefined", "Undefined"); - a(t(null), "null", "Null"); - a(t(null), "null", "Null"); - a(t("raz"), "\"raz\"", "String"); - a(t("raz\"ddwa\ntrzy"), "\"raz\\\"ddwa\\ntrzy\"", "String with escape"); - a(t(false), "false", "Booelean"); - a(t(fn), String(fn), "Function"); - - a(t(/raz-dwa/g), "/raz-dwa/g", "RegExp"); - a(t(new Date(1234567)), "new Date(1234567)", "Date"); - a(t([]), "[]", "Empty array"); - a( - t([undefined, false, null, "raz\"ddwa\ntrzy", fn, /raz/g, new Date(1234567), ["foo"]]), - "[undefined,false,null,\"raz\\\"ddwa\\ntrzy\"," + - String(fn) + - ",/raz/g,new Date(1234567),[\"foo\"]]", - "Rich Array" - ); - a(t({}), "{}", "Empty object"); - a( - t({ - raz: undefined, - dwa: false, - trzy: null, - cztery: "raz\"ddwa\ntrzy", - piec: fn, - szesc: /raz/g, - siedem: new Date(1234567), - osiem: ["foo", 32], - dziewiec: { foo: "bar", dwa: 343 } - }), - "{\"raz\":undefined,\"dwa\":false,\"trzy\":null,\"cztery\":\"raz\\\"ddwa\\ntrzy\"," + - "\"piec\":" + - String(fn) + - ",\"szesc\":/raz/g,\"siedem\":new Date(1234567),\"osiem\":[\"foo\",32]," + - "\"dziewiec\":{\"foo\":\"bar\",\"dwa\":343}}", - "Rich object" - ); -}; diff --git a/node_modules/es5-ext/test/object/set-prototype-of/implement.js b/node_modules/es5-ext/test/object/set-prototype-of/implement.js deleted file mode 100644 index 5b8fb9e99..000000000 --- a/node_modules/es5-ext/test/object/set-prototype-of/implement.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var create = require("../../../object/create") - , isImplemented = require("../../../object/set-prototype-of/is-implemented"); - -module.exports = function (a) { - a(isImplemented(create), true); -}; diff --git a/node_modules/es5-ext/test/object/set-prototype-of/index.js b/node_modules/es5-ext/test/object/set-prototype-of/index.js deleted file mode 100644 index 23619b079..000000000 --- a/node_modules/es5-ext/test/object/set-prototype-of/index.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -var create = require("../../../object/create") - - , getPrototypeOf = Object.getPrototypeOf; - -module.exports = function (t, a) { - var x = {}, y = {}; - - if (t === null) return; - a(t(x, y), x, "Return self object"); - a(getPrototypeOf(x), y, "Object"); - a.throws(function () { - t(x); -}, TypeError, "Undefined"); - a.throws(function () { - t("foo"); -}, TypeError, "Primitive"); - a(getPrototypeOf(t(x, null)), t.nullPolyfill || null, "Null"); - x = create(null); - a.h1("Change null prototype"); - a(t(x, y), x, "Result"); - a(getPrototypeOf(x), y, "Prototype"); - a.h1("Set null prototype"); - a(t(y, null), y, "Result"); - a(getPrototypeOf(y), t.nullPolyfill || null, "Prototype"); -}; diff --git a/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js b/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js deleted file mode 100644 index 5003e7e93..000000000 --- a/node_modules/es5-ext/test/object/set-prototype-of/is-implemented.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - a(typeof t(), "boolean"); -}; diff --git a/node_modules/es5-ext/test/object/set-prototype-of/shim.js b/node_modules/es5-ext/test/object/set-prototype-of/shim.js deleted file mode 100644 index 23619b079..000000000 --- a/node_modules/es5-ext/test/object/set-prototype-of/shim.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -var create = require("../../../object/create") - - , getPrototypeOf = Object.getPrototypeOf; - -module.exports = function (t, a) { - var x = {}, y = {}; - - if (t === null) return; - a(t(x, y), x, "Return self object"); - a(getPrototypeOf(x), y, "Object"); - a.throws(function () { - t(x); -}, TypeError, "Undefined"); - a.throws(function () { - t("foo"); -}, TypeError, "Primitive"); - a(getPrototypeOf(t(x, null)), t.nullPolyfill || null, "Null"); - x = create(null); - a.h1("Change null prototype"); - a(t(x, y), x, "Result"); - a(getPrototypeOf(x), y, "Prototype"); - a.h1("Set null prototype"); - a(t(y, null), y, "Result"); - a(getPrototypeOf(y), t.nullPolyfill || null, "Prototype"); -}; diff --git a/node_modules/es5-ext/test/object/some.js b/node_modules/es5-ext/test/object/some.js deleted file mode 100644 index 97e5d772d..000000000 --- a/node_modules/es5-ext/test/object/some.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -var o = { 1: 1, 2: 2, 3: 3 }; - -module.exports = function (t, a) { - var o2 = {}, i = 0; - t(o, function (value, name) { - o2[name] = value; - return false; - }); - a(JSON.stringify(o2), JSON.stringify(o), "Iterates"); - - a(t(o, function () { - ++i; - return true; - }), true, "Succeeds"); - a(i, 1, "Stops iteration after condition is met"); - - a(t(o, function () { - return false; - }), false, "Fails"); - -}; diff --git a/node_modules/es5-ext/test/object/to-array.js b/node_modules/es5-ext/test/object/to-array.js deleted file mode 100644 index cd11a05f2..000000000 --- a/node_modules/es5-ext/test/object/to-array.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var o = { 1: 1, 2: 2, 3: 3 }, o1 = {} - , o2 = t(o, function (value, name, self) { - a(self, o, "Self"); - a(this, o1, "Scope"); - return value + Number(name); - }, o1); - a.deep(o2, [2, 4, 6]); - - t(o).sort().forEach(function (item) { - a.deep(item, [item[0], o[item[0]]], "Default"); - }); -}; diff --git a/node_modules/es5-ext/test/object/unserialize.js b/node_modules/es5-ext/test/object/unserialize.js deleted file mode 100644 index 5af3c77fe..000000000 --- a/node_modules/es5-ext/test/object/unserialize.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var fn = function (raz, dwa) { - return raz + dwa; - }; - a(t("undefined"), undefined, "Undefined"); - a(t("null"), null, "Null"); - a(t("\"raz\""), "raz", "String"); - a(t("\"raz\\\"ddwa\\ntrzy\""), "raz\"ddwa\ntrzy", "String with escape"); - a(t("false"), false, "Booelean"); - a(String(t(String(fn))), String(fn), "Function"); - - a.deep(t("/raz-dwa/g"), /raz-dwa/g, "RegExp"); - a.deep(t("new Date(1234567)"), new Date(1234567), "Date"); - a.deep(t("[]"), [], "Empty array"); - a.deep( - t("[undefined,false,null,\"raz\\\"ddwa\\ntrzy\",/raz/g,new Date(1234567),[\"foo\"]]"), - [undefined, false, null, "raz\"ddwa\ntrzy", /raz/g, new Date(1234567), ["foo"]], - "Rich Array" - ); - a.deep(t("{}"), {}, "Empty object"); - a.deep( - t( - "{\"raz\":undefined,\"dwa\":false,\"trzy\":null,\"cztery\":\"raz\\\"ddwa\\ntrzy\"," + - "\"szesc\":/raz/g,\"siedem\":new Date(1234567),\"osiem\":[\"foo\",32]," + - "\"dziewiec\":{\"foo\":\"bar\",\"dwa\":343}}" - ), - { - raz: undefined, - dwa: false, - trzy: null, - cztery: "raz\"ddwa\ntrzy", - szesc: /raz/g, - siedem: new Date(1234567), - osiem: ["foo", 32], - dziewiec: { foo: "bar", dwa: 343 } - }, - "Rich object" - ); -}; diff --git a/node_modules/es5-ext/test/object/valid-callable.js b/node_modules/es5-ext/test/object/valid-callable.js deleted file mode 100644 index fb7310c84..000000000 --- a/node_modules/es5-ext/test/object/valid-callable.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var f = function () {}; - a(t(f), f, "Function"); - a.throws(function () { - t({}); - }, "Not Function"); -}; diff --git a/node_modules/es5-ext/test/object/valid-object.js b/node_modules/es5-ext/test/object/valid-object.js deleted file mode 100644 index b33be9779..000000000 --- a/node_modules/es5-ext/test/object/valid-object.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var x; - a.throws(function () { - t(0); -}, TypeError, "0"); - a.throws(function () { - t(false); -}, TypeError, "false"); - a.throws(function () { - t(""); -}, TypeError, "''"); - a(t(x = {}), x, "Object"); - a(t(x = function () {}), x, "Function"); - a(t(x = new String("raz")), x, "String object"); // Jslint: ignore - a(t(x = new Date()), x, "Date"); - - a.throws(function () { - t(); -}, TypeError, "Undefined"); - a.throws(function () { - t(null); -}, TypeError, "null"); -}; diff --git a/node_modules/es5-ext/test/object/valid-value.js b/node_modules/es5-ext/test/object/valid-value.js deleted file mode 100644 index 394f89f77..000000000 --- a/node_modules/es5-ext/test/object/valid-value.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; - -var numIsNaN = require("../../number/is-nan"); - -module.exports = function (t, a) { - var x; - a(t(0), 0, "0"); - a(t(false), false, "false"); - a(t(""), "", "''"); - a(numIsNaN(t(NaN)), true, "NaN"); - a(t(x = {}), x, "{}"); - - a.throws(function () { - t(); - }, "Undefined"); - a.throws(function () { - t(null); - }, "null"); -}; diff --git a/node_modules/es5-ext/test/object/validate-array-like-object.js b/node_modules/es5-ext/test/object/validate-array-like-object.js deleted file mode 100644 index b10ec69b5..000000000 --- a/node_modules/es5-ext/test/object/validate-array-like-object.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var x; - a.throws(function () { - t(0); -}, TypeError, "0"); - a.throws(function () { - t(false); -}, TypeError, "false"); - a.throws(function () { - t(""); -}, TypeError, "String"); - a.throws(function () { - t({}); -}, TypeError, "Plain Object"); - a.throws(function () { - t(function () {}); -}, TypeError, "Function"); - a(t(x = new String("raz")), x, "String object"); // Jslint: ignore - - a(t(x = { length: 1 }), x, "Array like"); - a.throws(function () { - t(); -}, TypeError, "Undefined"); - a.throws(function () { - t(null); -}, TypeError, "null"); -}; diff --git a/node_modules/es5-ext/test/object/validate-array-like.js b/node_modules/es5-ext/test/object/validate-array-like.js deleted file mode 100644 index 6da6b191e..000000000 --- a/node_modules/es5-ext/test/object/validate-array-like.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var x; - a.throws(function () { - t(0); -}, TypeError, "0"); - a.throws(function () { - t(false); -}, TypeError, "false"); - a(t(""), "", "''"); - a.throws(function () { - t({}); -}, TypeError, "Plain Object"); - a.throws(function () { - t(function () {}); -}, TypeError, "Function"); - a(t(x = new String("raz")), x, "String object"); // Jslint: ignore - - a(t(x = { length: 1 }), x, "Array like"); - a.throws(function () { - t(); -}, TypeError, "Undefined"); - a.throws(function () { - t(null); -}, TypeError, "null"); -}; diff --git a/node_modules/es5-ext/test/object/validate-stringifiable-value.js b/node_modules/es5-ext/test/object/validate-stringifiable-value.js deleted file mode 100644 index 8283814ab..000000000 --- a/node_modules/es5-ext/test/object/validate-stringifiable-value.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var x; - a.throws(function () { - t(); -}, TypeError, "Undefined"); - a.throws(function () { - t(null); -}, TypeError, "Null"); - a(t(0), "0"); - a(t(false), "false"); - a(t(""), ""); - a(t({}), String({}), "Object"); - a(t(x = function () {}), String(x), "Function"); - a(t(x = new String("raz")), String(x), "String object"); // Jslint: ignore - a(t(x = new Date()), String(x), "Date"); - - a.throws(function () { - t(Object.create(null)); -}, TypeError, "Null prototype object"); -}; diff --git a/node_modules/es5-ext/test/object/validate-stringifiable.js b/node_modules/es5-ext/test/object/validate-stringifiable.js deleted file mode 100644 index e75a4157b..000000000 --- a/node_modules/es5-ext/test/object/validate-stringifiable.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -module.exports = function (t, a) { - var x; - a(t(), "undefined", "Undefined"); - a(t(null), "null", "Null"); - a(t(0), "0"); - a(t(false), "false"); - a(t(""), ""); - a(t({}), String({}), "Object"); - a(t(x = function () {}), String(x), "Function"); - a(t(x = new String("raz")), String(x), "String object"); // Jslint: ignore - a(t(x = new Date()), String(x), "Date"); - - a.throws(function () { - t(Object.create(null)); -}, TypeError, "Null prototype object"); -}; |
