Add custom-debug build to unit test runners and add unit tests for passing strings to "Collections" methods.

Former-commit-id: cb6c66d01a9f30908a27e689f8ffba5fa9f04299
This commit is contained in:
John-David Dalton
2012-07-10 01:06:06 -04:00
parent fad9b4fa72
commit 329c7e8e05
2 changed files with 76 additions and 13 deletions

View File

@@ -13,9 +13,14 @@
/*--------------------------------------------------------------------------*/
// assign `QUnit.config` properties
QUnit.config.lodashFilename = build == 'prod'
? 'lodash.min'
: (build == 'custom' ? 'lodash.custom.min' : 'lodash');
QUnit.config.lodashFilename = (function() {
switch (build) {
case 'custom': return 'lodash.custom.min';
case 'custom-debug': return 'lodash.custom';
case 'prod': return 'lodash.min';
}
return 'lodash';
}());
// assign `QUnit.urlParams` properties
QUnit.extend(QUnit.urlParams, {
@@ -45,11 +50,15 @@
header.appendChild(label1);
header.appendChild(label2);
if (build == 'prod') {
dropdown.selectedIndex = 1;
} else if (build == 'custom') {
dropdown.selectedIndex = 2;
}
dropdown.selectedIndex = (function() {
switch (build) {
case 'custom': return 3;
case 'custom-debug': return 2;
case 'prod': return 1;
}
return 0;
}());
checkbox.checked = norequire;
addEvent(checkbox, 'click', eventHandler);
addEvent(dropdown, 'change', eventHandler);
@@ -68,6 +77,7 @@
'<select name="build">' +
'<option value="dev">developement</option>' +
'<option value="prod">production</option>' +
'<option value="custom-debug">custom (debug)</option>' +
'<option value="custom">custom</option>' +
'</select>build';