Make capitalize in test/test-build.js consistent with other areas.

Former-commit-id: 2a4b6a2f394e474af2c3ca9376ec0ac2580e9bb9
This commit is contained in:
John-David Dalton
2013-05-23 20:23:48 -07:00
parent 6dc543ca18
commit 0efb4285c1

View File

@@ -334,7 +334,7 @@
* @returns {String} Returns the capitalized string.
*/
function capitalize(string) {
return string[0].toUpperCase() + string.toLowerCase().slice(1);
return string[0].toUpperCase() + string.slice(1);
}
/**
@@ -1565,7 +1565,9 @@
}
}
if (/\bcategory=/.test(command)) {
methodNames = (methodNames || []).concat(command.match(/\bcategory=(\S*)/)[1].split(/, */).map(capitalize));
methodNames = (methodNames || []).concat(command.match(/\bcategory=(\S*)/)[1].split(/, */).map(function(category) {
return capitalize(category.toLowerCase());
}));
}
if (!methodNames) {
methodNames = lodashMethods.slice();