From c494fb8afe6e731ff4a89ab62dc99790161ef69f Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 5 Nov 2020 22:49:38 +0000 Subject: [PATCH] HTML Reporter: Remove unused 'moduleList' array Follows-up 0780127c7f64, which changed the code to use QUnit.config.modules directly. This meant the list is no longer sorted, however. I filed https://github.com/qunitjs/qunit/issues/1487 to look into that. Depending on the outcome of that, we can bring this back in some form after the refactoring of https://github.com/qunitjs/qunit/issues/1487. --- reporter/html.js | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/reporter/html.js b/reporter/html.js index 63542c5e8..51db8a0fc 100644 --- a/reporter/html.js +++ b/reporter/html.js @@ -49,8 +49,7 @@ export function escapeText( s ) { collapseNext = false, hasOwn = Object.prototype.hasOwnProperty, unfilteredUrl = setUrl( { filter: undefined, module: undefined, - moduleId: undefined, testId: undefined } ), - modulesList = []; + moduleId: undefined, testId: undefined } ); function addEvent( elem, type, fn ) { elem.addEventListener( type, fn, false ); @@ -659,19 +658,7 @@ export function escapeText( s ) { } // HTML Reporter initialization and load - QUnit.begin( function( details ) { - var i, moduleObj; - - // Sort modules by name for the picker - for ( i = 0; i < details.modules.length; i++ ) { - moduleObj = details.modules[ i ]; - if ( moduleObj.name ) { - modulesList.push( moduleObj.name ); - } - } - modulesList.sort( function( a, b ) { - return a.localeCompare( b ); - } ); + QUnit.begin( function() { // Initialize QUnit elements appendInterface();