Skip to content

Commit

Permalink
Fix test on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrantly committed Jan 10, 2016
1 parent b973fdd commit 60dfbbe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,13 @@ function createTest(test, testPath, options) {

var statsFileName = 'output.txt';

// do a little magic to normalize `\` to `/` for asset output
var newAssets = {};
Object.keys(stats.compilation.assets).forEach(function(asset) {
newAssets[asset.replace(/\\/g, "/")] = stats.compilation.assets[asset];
});
stats.compilation.assets = newAssets;

var statsString = stats.toString({timings: false, version: false, hash: false})
.replace(new RegExp(regexEscape(testStagingPath+path.sep), 'g'), '')
.replace(new RegExp(regexEscape(rootPath+path.sep), 'g'), '')
Expand Down

0 comments on commit 60dfbbe

Please sign in to comment.