aboutsummaryrefslogtreecommitdiff
path: root/node_modules/es5-ext/test/object/assign-deep.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-12-10 21:51:33 +0100
committerFlorian Dold <florian.dold@gmail.com>2017-12-10 21:51:33 +0100
commit0469abd4a9c9270a1fdc962969e36e63699af8b4 (patch)
treef9864d4a4148621378958794cbbfdc2393733283 /node_modules/es5-ext/test/object/assign-deep.js
parent6947e79bbc258f7bc96af424ddb71a511f0c15a3 (diff)
upgrade dependencies
Diffstat (limited to 'node_modules/es5-ext/test/object/assign-deep.js')
-rw-r--r--node_modules/es5-ext/test/object/assign-deep.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/node_modules/es5-ext/test/object/assign-deep.js b/node_modules/es5-ext/test/object/assign-deep.js
new file mode 100644
index 000000000..071eeb739
--- /dev/null
+++ b/node_modules/es5-ext/test/object/assign-deep.js
@@ -0,0 +1,15 @@
+"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] };
+ a.deep(t({}, obj1, obj2), { foo: { bar: 3, marko: false, elo: 12 }, miszka: [23] });
+ a(t(true), true);
+};