From 0933e04d27e24491864e0ffeb95c43aca9b0d0d7 Mon Sep 17 00:00:00 2001 From: Rebecca Stevens Date: Sat, 23 Jan 2021 23:51:36 +1300 Subject: [PATCH] test: move mergeAll test to merge-all test file --- test/merge-all.ts | 12 ++++++++++++ test/merge.ts | 13 +------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/test/merge-all.ts b/test/merge-all.ts index dc392b2..03f1074 100644 --- a/test/merge-all.ts +++ b/test/merge-all.ts @@ -88,3 +88,15 @@ test('invoke merge on every item in array without clone should clone all element t.end() }) + +test('With clone: false, mergeAll should not clone the target root', t => { + const destination = {} + const output = mergeAll([ + destination, { + sup: true + } + ], { clone: false }) + + t.equal(destination, output) + t.end() +}) diff --git a/test/merge.ts b/test/merge.ts index 0d65ece..3d2be9d 100644 --- a/test/merge.ts +++ b/test/merge.ts @@ -1,4 +1,4 @@ -import { deepmerge as merge, deepmergeAll as mergeAll } from "deepmerge" +import { deepmerge as merge } from "deepmerge" import test from "tape" test('add keys in target that do not exist at the root', function(t) { @@ -687,14 +687,3 @@ test('With clone: false, merge should not clone the target root', t => { t.end() }) -test('With clone: false, merge.all should not clone the target root', t => { - const destination = {} - const output = mergeAll([ - destination, { - sup: true - } - ], { clone: false }) - - t.equal(destination, output) - t.end() -})