Allow deep clone if requested via include or plus with the underscore build.

Former-commit-id: e86dba41f7265700330e57346a112b578873b390
This commit is contained in:
John-David Dalton
2012-10-02 21:39:18 -07:00
parent fd2a17d244
commit 4017443b1e
2 changed files with 36 additions and 8 deletions

View File

@@ -633,6 +633,24 @@
start();
});
});
asyncTest('`lodash underscore plus=clone`', function() {
var start = _.after(2, _.once(QUnit.start));
build(['-s', 'underscore', 'plus=clone'], function(source, filePath) {
var array = [{ 'value': 1 }],
basename = path.basename(filePath, '.js'),
context = createContext();
vm.runInContext(source, context);
var lodash = context._,
clone = lodash.clone(array, true);
deepEqual(array, clone, basename);
notEqual(array, clone, basename);
start();
});
});
}());
/*--------------------------------------------------------------------------*/