From c4fcc805ee118bef51dd5d9d977faaaa7387aeb1 Mon Sep 17 00:00:00 2001 From: Andrei Dumitrescu <5057797+andreidcm@users.noreply.github.com> Date: Thu, 3 Sep 2020 18:23:27 +0200 Subject: [PATCH] fix(merge): Uncurried call not using passed objects --- src/merge/merge.js | 2 +- src/merge/merge.test.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/merge/merge.js b/src/merge/merge.js index 7903410..c4b3a59 100644 --- a/src/merge/merge.js +++ b/src/merge/merge.js @@ -47,7 +47,7 @@ export const merge = (...params) => { } // @signature (obj1, obj2) - return _merge(null, ...params) + return _merge(null, params) } export const mergeBy = (...params) => { diff --git a/src/merge/merge.test.js b/src/merge/merge.test.js index fc92960..f247062 100644 --- a/src/merge/merge.test.js +++ b/src/merge/merge.test.js @@ -30,5 +30,11 @@ test("merge, mergeAll", t => { "merge 2 objects - curried" ) + t.deepEqual( + merge(obj1, obj2), + { a: "lorem", b: "ipsum", c: 41 }, + "merge 2 objects - curried" + ) + t.end() })