From a457675ce1ea3332bd68432aaa24714280a1ac00 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 20 Jan 2013 12:09:44 -0800 Subject: [PATCH] Move deep `_.defaults` implementation unit test to `_.partialRight`. Former-commit-id: 7e5c6184d24b47170ef148122ef5c7428f8b2da9 --- test/test.js | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/test/test.js b/test/test.js index 1748226cc..5a1428dd2 100644 --- a/test/test.js +++ b/test/test.js @@ -1466,14 +1466,6 @@ deepEqual(actual, { 'a': 2 }); }); - - test('should work as a deep `_.defaults`', function() { - var object = { 'a': { 'b': 1 } }, - source = { 'a': { 'b': 2, 'c': 3 } }, - expected = { 'a': { 'b': 1, 'c': 3 } }; - - deepEqual(_.merge(object, source, _.defaults), expected); - }); }(1, 2, 3)); /*--------------------------------------------------------------------------*/ @@ -1584,6 +1576,21 @@ /*--------------------------------------------------------------------------*/ + QUnit.module('lodash.partialRight'); + + (function() { + test('should work as a deep `_.defaults`', function() { + var object = { 'a': { 'b': 1 } }, + source = { 'a': { 'b': 2, 'c': 3 } }, + expected = { 'a': { 'b': 1, 'c': 3 } }; + + var deepDefaults = _.partialRight(_.merge, _.defaults); + deepEqual(deepDefaults(object, source), expected); + }); + }()); + + /*--------------------------------------------------------------------------*/ + QUnit.module('lodash.pick'); (function() {