fix error for Example test cases
This commit is contained in:
parent
5abf55b1af
commit
f2e1c04372
|
@ -41,11 +41,17 @@ describe("Examples", () => {
|
|||
}
|
||||
webpack(options, (err, stats) => {
|
||||
if (err) return done(err);
|
||||
stats = stats.toJson({
|
||||
errorDetails: true
|
||||
});
|
||||
if (stats.errors.length > 0) {
|
||||
return done(new Error(stats.errors[0]));
|
||||
if (stats.hasErrors()) {
|
||||
return done(
|
||||
new Error(
|
||||
stats.toString({
|
||||
all: false,
|
||||
errors: true,
|
||||
errorDetails: true,
|
||||
errorStacks: true
|
||||
})
|
||||
)
|
||||
);
|
||||
}
|
||||
done();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue