Skip to content

Commit

Permalink
HTML Reporter: Remove unused 'moduleList' arrray
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 Oct 2, 2020
1 parent 3e4229d commit 5a05192
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions reporter/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,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 @@ -649,20 +648,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 5a05192

Please sign in to comment.