mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 19:37:49 +00:00
Add _.concat test for shallow cloning array.
This commit is contained in:
10
test/test.js
10
test/test.js
@@ -3056,6 +3056,16 @@
|
|||||||
QUnit.module('lodash.concat');
|
QUnit.module('lodash.concat');
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
QUnit.test('should shallow clone `array`', function(assert) {
|
||||||
|
assert.expect(2);
|
||||||
|
|
||||||
|
var array = [1, 2, 3],
|
||||||
|
actual = _.concat(array);
|
||||||
|
|
||||||
|
assert.deepEqual(actual, array);
|
||||||
|
assert.notStrictEqual(actual, array);
|
||||||
|
});
|
||||||
|
|
||||||
QUnit.test('should concat arrays and values', function(assert) {
|
QUnit.test('should concat arrays and values', function(assert) {
|
||||||
assert.expect(2);
|
assert.expect(2);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user