mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
Add a --time-limit option to test-build.js so travis-ci can complete its test runs.
Former-commit-id: 742b17208d6c9316efea33c106e7689b9290f48d
This commit is contained in:
@@ -14,6 +14,11 @@
|
||||
var QUnit = global.QUnit = require('../vendor/qunit/qunit/qunit.js');
|
||||
require('../vendor/qunit-clib/qunit-clib.js');
|
||||
|
||||
/** The time limit for the tests to run (minutes) */
|
||||
var timeLimit = process.argv.reduce(function(result, value, index) {
|
||||
return (/--time-limit/.test(value) && parseFloat(process.argv[index + 1])) || result;
|
||||
}, Infinity);
|
||||
|
||||
/** Used to associate aliases with their real names */
|
||||
var aliasToRealMap = {
|
||||
'all': 'every',
|
||||
@@ -1178,4 +1183,9 @@
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
if (isFinite(timeLimit)) {
|
||||
setTimeout(process.exit, timeLimit * 6e4);
|
||||
}
|
||||
}());
|
||||
|
||||
Reference in New Issue
Block a user