Skip to content

Commit edf880b

Browse files
authored
refactor(test:helpers): clean up pack compiler (#34)
1 parent 53a19b5 commit edf880b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/helpers/pack.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
var webpack = require('webpack');
44
var MemoryFileSystem = require('memory-fs');
55

6-
var outputFileSystem = new MemoryFileSystem();
7-
86
/**
97
* Basic in memory compiler, promisified
108
* @param testConfig - the plugin config being tested run through the webpack compiler
@@ -13,10 +11,10 @@ var outputFileSystem = new MemoryFileSystem();
1311
module.exports = function pack(testConfig) {
1412
return new Promise(function (resolve, reject) {
1513
var compiler = webpack(testConfig);
16-
compiler.outputFileSystem = outputFileSystem;
14+
compiler.outputFileSystem = new MemoryFileSystem();
1715
compiler.run(function (err, stats) {
1816
if (err) {
19-
return reject({err: err, stats: stats});
17+
return reject(err);
2018
}
2119
return resolve(stats);
2220
});

0 commit comments

Comments
 (0)