Skip to content

Commit

Permalink
HTML Reporter: Remove unused 'moduleList' array
Browse files Browse the repository at this point in the history
Follows-up 0780127, which changed the code to use
QUnit.config.modules directly. This meant the list is no longer
sorted, however. I filed #1487
to look into that.

Depending on the outcome of that, we can bring this back in some form
after the refactoring of #1487.
  • Loading branch information
Krinkle committed Nov 5, 2020
1 parent 5289581 commit c494fb8
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions reporter/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit c494fb8

Please sign in to comment.