From 5e0d48b40f7c6947b8d71c74815be1c90ac2c072 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 26 Mar 2014 02:26:32 -0700 Subject: [PATCH] Tweak `_.union` tests. --- test/test.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/test/test.js b/test/test.js index 3fb21f1e5..660304bdc 100644 --- a/test/test.js +++ b/test/test.js @@ -8849,23 +8849,21 @@ (function() { test('should return the union of the given arrays', 1, function() { - var actual = _.union([1, 2, 3], [5, 2, 1, 4], [2, 1]); - deepEqual(actual, [1, 2, 3, 5, 4]); + var actual = _.union([1, 3, 2], [5, 2, 1, 4], [2, 1]); + deepEqual(actual, [1, 3, 2, 5, 4]); }); test('should not flatten nested arrays', 1, function() { - var actual = _.union([1, 2, 3], [1, [5]], [2, [4]]); - deepEqual(actual, [1, 2, 3, [5], [4]]); + var actual = _.union([1, 3, 2], [1, [5]], [2, [4]]); + deepEqual(actual, [1, 3, 2, [5], [4]]); }); - test('should produce correct results when provided a falsey `array` argument', 1, function() { - var expected = [1, 2, 3], - actual = _.union(null, expected); - - deepEqual(actual, expected); + test('should with only secondary arguments', 1, function() { + var actual = _.union(null, [1, 3, 2], [5, 4]); + deepEqual(actual, [1, 3, 2, 5, 4]); }); - test('should ignore individual secondary values', 1, function() { + test('should ignore individual secondary arguments', 1, function() { var array = [0]; deepEqual(_.union(array, 3, null, { '0': 1 }), array); });