Skip to content

Commit a69a26d

Browse files
committed
improving webpack test
1 parent 2fe397e commit a69a26d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

test/webpack.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,18 @@ describe('Webpack', function() {
1919
}
2020
});
2121
compiler.outputFileSystem = fs;
22-
compiler.run(done);
22+
compiler.run(function(err, stats) {
23+
if (err) {
24+
// fatal error
25+
return done(err);
26+
}
27+
if (stats.compilation.errors && stats.compilation.errors.length) {
28+
// non-fatal errors that nonetheless still probably bork things
29+
return done(stats.compilation.errors);
30+
}
31+
// console.log(stats.compilation);
32+
done();
33+
});
2334
});
2435

2536
});

0 commit comments

Comments
 (0)