Skip to content

Commit

Permalink
Generate the hashes only once, and reuse them for every url
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkni committed Apr 12, 2016
1 parent dadf6ac commit 8911a47
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tasks/qunit.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,13 @@ module.exports = function(grunt) {

if (grunt.option('modules')) {
var modules = grunt.option('modules').split(',');
var hashes = modules.map(function(module) {
return generateHash(module.trim());
});
// Append moduleId to all urls
urls = urls.map(function(testUrl) {
parsed = url.parse(testUrl, true);
parsed.query.moduleId = modules.map(function(module) {
return generateHash(module.trim());
});
parsed.query.moduleId = hashes;
delete parsed.search;
return url.format(parsed);
});
Expand Down

0 comments on commit 8911a47

Please sign in to comment.