Skip to content

Commit f7c232c

Browse files
committed
write out stats test results
1 parent c838656 commit f7c232c

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

test/Stats.test.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
var should = require("should");
33
var path = require("path");
44
var fs = require("fs");
5+
var mkdirp = require("mkdirp");
56

67
var webpack = require("../lib/webpack");
78

89
var base = path.join(__dirname, "statsCases");
10+
var outputBase = path.join(__dirname, "js", "stats");
911
var tests = fs.readdirSync(base);
1012
var Stats = require("../lib/Stats");
1113

@@ -23,22 +25,12 @@ describe("Stats", function() {
2325
}
2426
(Array.isArray(options) ? options : [options]).forEach(function(options) {
2527
options.context = path.join(base, testName);
28+
options.output = options.output || {};
29+
options.output.path = path.join(outputBase, testName);
2630
});
2731
var c = webpack(options);
28-
var files = {};
2932
var compilers = c.compilers ? c.compilers : [c];
3033
compilers.forEach(function(c) {
31-
c.outputFileSystem = {
32-
join: path.join.bind(path),
33-
mkdirp: function(path, callback) {
34-
callback();
35-
},
36-
writeFile: function(name, content, callback) {
37-
files[name] = content.toString("utf-8");
38-
callback();
39-
}
40-
};
41-
4234
var ifs = c.inputFileSystem;
4335
c.inputFileSystem = Object.create(ifs);
4436
c.inputFileSystem.readFile = function() {

0 commit comments

Comments
 (0)