mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-13 04:17:49 +00:00
Cleanup clone tests.
This commit is contained in:
10
test/test.js
10
test/test.js
@@ -2745,14 +2745,12 @@
|
|||||||
var func = _[methodName],
|
var func = _[methodName],
|
||||||
isDeep = methodName == 'cloneDeep';
|
isDeep = methodName == 'cloneDeep';
|
||||||
|
|
||||||
lodashStable.forOwn(objects, function(object, key) {
|
lodashStable.forOwn(objects, function(object, kind) {
|
||||||
QUnit.test('`_.' + methodName + '` should clone ' + key, function(assert) {
|
QUnit.test('`_.' + methodName + '` should clone ' + kind, function(assert) {
|
||||||
assert.expect(2);
|
assert.expect(2);
|
||||||
|
|
||||||
var isEqual = (key == 'maps' || key == 'sets') ? _.isEqual : lodashStable.isEqual,
|
var actual = func(object);
|
||||||
actual = func(object);
|
assert.ok(lodashStable.isEqual(actual, object));
|
||||||
|
|
||||||
assert.ok(isEqual(actual, object));
|
|
||||||
|
|
||||||
if (lodashStable.isObject(object)) {
|
if (lodashStable.isObject(object)) {
|
||||||
assert.notStrictEqual(actual, object);
|
assert.notStrictEqual(actual, object);
|
||||||
|
|||||||
Reference in New Issue
Block a user