mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Add doc not for chaining support in custom builds and tweak support rules in build.js. [closes #193]
Former-commit-id: c87f6bfe28f00d9228f4112463635d555e138a41
This commit is contained in:
@@ -1073,6 +1073,44 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('include command');
|
||||
|
||||
(function() {
|
||||
var commands = [
|
||||
'include=mixin',
|
||||
'include=mixin,tap',
|
||||
'include=mixin,value'
|
||||
];
|
||||
|
||||
commands.forEach(function(command, index) {
|
||||
asyncTest('`lodash ' + command +'`', function() {
|
||||
var start = _.after(2, _.once(QUnit.start));
|
||||
|
||||
build(['-s', command], function(data) {
|
||||
var basename = path.basename(data.outputPath, '.js'),
|
||||
context = createContext(),
|
||||
noop = function() {},
|
||||
source = data.source;
|
||||
|
||||
vm.runInContext(data.source, context);
|
||||
var lodash = context._;
|
||||
|
||||
lodash.mixin({ 'x': noop });
|
||||
equal(lodash.x, noop, basename);
|
||||
|
||||
if (index) {
|
||||
equal(typeof lodash.prototype.x, 'function', basename);
|
||||
} else {
|
||||
equal('x' in lodash.prototype.x, false, basename);
|
||||
}
|
||||
start();
|
||||
});
|
||||
});
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('output options');
|
||||
|
||||
(function() {
|
||||
|
||||
Reference in New Issue
Block a user