diff --git a/tests/js-tests/src/tests-main.js b/tests/js-tests/src/tests-main.js index b6efec7e19..1beb3568ab 100644 --- a/tests/js-tests/src/tests-main.js +++ b/tests/js-tests/src/tests-main.js @@ -114,6 +114,15 @@ var TestController = cc.LayerGradient.extend({ menu.x = 0; menu.y = 0; + // sort the test title + testNames.sort(function(first, second){ + if (first.title > second.title) + { + return 1; + } + return -1; + }); + // add menu items for tests this._itemMenu = new cc.Menu();//item menu is where all the label goes, and the one gets scrolled