mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 17:07: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],
|
||||
isDeep = methodName == 'cloneDeep';
|
||||
|
||||
lodashStable.forOwn(objects, function(object, key) {
|
||||
QUnit.test('`_.' + methodName + '` should clone ' + key, function(assert) {
|
||||
lodashStable.forOwn(objects, function(object, kind) {
|
||||
QUnit.test('`_.' + methodName + '` should clone ' + kind, function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
var isEqual = (key == 'maps' || key == 'sets') ? _.isEqual : lodashStable.isEqual,
|
||||
actual = func(object);
|
||||
|
||||
assert.ok(isEqual(actual, object));
|
||||
var actual = func(object);
|
||||
assert.ok(lodashStable.isEqual(actual, object));
|
||||
|
||||
if (lodashStable.isObject(object)) {
|
||||
assert.notStrictEqual(actual, object);
|
||||
|
||||
Reference in New Issue
Block a user