mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +00:00
Update test configs and move builds.
Former-commit-id: dc14112821f14101f107f90e9aeb5abec55b18a6
This commit is contained in:
@@ -2,7 +2,7 @@ cd "$(dirname "$0")"
|
||||
for cmd in rhino ringo narwhal node; do
|
||||
echo ""
|
||||
echo "Testing in $cmd..."
|
||||
$cmd test.js
|
||||
$cmd test.js && $cmd test.js ../lodash.min.js
|
||||
done
|
||||
|
||||
echo ""
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
ui.buildPath = (function() {
|
||||
switch (build) {
|
||||
case 'lodash-prod': return 'lodash.min.js';
|
||||
case 'lodash-underscore': return 'lodash.underscore.min.js';
|
||||
case 'lodash-underscore': return 'dist/lodash.underscore.min.js';
|
||||
case 'lodash-modern': return 'dist/lodash.min.js';
|
||||
case 'lodash-modern-debug': return 'dist/lodash.js';
|
||||
case 'lodash-custom': return 'lodash.custom.min.js';
|
||||
case 'lodash-custom-debug': return 'lodash.custom.js';
|
||||
}
|
||||
@@ -58,8 +60,10 @@
|
||||
switch (build) {
|
||||
case 'lodash-prod': return 1;
|
||||
case 'lodash-underscore': return 2;
|
||||
case 'lodash-custom': return 3;
|
||||
case 'lodash-custom-debug': return 4;
|
||||
case 'lodash-modern': return 3;
|
||||
case 'lodash-modern-debug': return 4;
|
||||
case 'lodash-custom': return 5;
|
||||
case 'lodash-custom-debug': return 6;
|
||||
}
|
||||
return 0;
|
||||
}());
|
||||
@@ -86,6 +90,8 @@
|
||||
'<option value="lodash-dev">Developement</option>' +
|
||||
'<option value="lodash-prod">Production</option>' +
|
||||
'<option value="lodash-underscore">Underscore</option>' +
|
||||
'<option value="lodash-modern">Modern</option>' +
|
||||
'<option value="lodash-modern-debug">Modern (debug)</option>' +
|
||||
'<option value="lodash-custom">Custom</option>' +
|
||||
'<option value="lodash-custom-debug">Custom (debug)</option>' +
|
||||
'</select>';
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
var QUnit =
|
||||
window.QUnit || (
|
||||
window.addEventListener || (window.addEventListener = Function.prototype),
|
||||
window.setTimeout || (window.setTimeout = Function.prototype),
|
||||
window.setTimeout || (window.setTimeout = / /),
|
||||
window.QUnit = load('../vendor/qunit/qunit/qunit.js') || window.QUnit,
|
||||
load('../vendor/qunit-clib/qunit-clib.js'),
|
||||
window.addEventListener === Function.prototype && delete window.addEventListener,
|
||||
@@ -609,7 +609,7 @@
|
||||
|
||||
test('lodash.' + methodName + ' should not throw strict mode errors', function() {
|
||||
var object = { 'a': null, 'b': function(){} },
|
||||
pass = true;
|
||||
pass = !/dist\/lodash(\.min)?\.js/.test(typeof ui != 'undefined' ? ui.buildPath : filePath);
|
||||
|
||||
if (freeze) {
|
||||
freeze(object);
|
||||
@@ -620,7 +620,7 @@
|
||||
func(object, { 'a': 1 });
|
||||
}
|
||||
} catch(e) {
|
||||
pass = false;
|
||||
pass = !pass;
|
||||
}
|
||||
ok(pass);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user