Skip to content

Commit cdeded5

Browse files
committed
report errors/warnings during compilation for caching
1 parent 13b65a2 commit cdeded5

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

test/ConfigTestCases.template.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,15 @@ const describeCases = config => {
168168
const deprecationTracker = deprecationTracking.start();
169169
require("..")(options, err => {
170170
deprecationTracker();
171+
const infrastructureLogging = stderr.toString();
172+
if (infrastructureLogging) {
173+
return done(
174+
new Error(
175+
"Errors/Warnings during build:\n" +
176+
infrastructureLogging
177+
)
178+
);
179+
}
171180
if (err) return handleFatalError(err, done);
172181
done();
173182
});
@@ -185,6 +194,15 @@ const describeCases = config => {
185194
errorsCount: true
186195
});
187196
if (errorsCount === 0) {
197+
const infrastructureLogging = stderr.toString();
198+
if (infrastructureLogging) {
199+
return done(
200+
new Error(
201+
"Errors/Warnings during build:\n" +
202+
infrastructureLogging
203+
)
204+
);
205+
}
188206
const allModules = children
189207
? children.reduce(
190208
(all, { modules }) => all.concat(modules),
@@ -260,7 +278,7 @@ const describeCases = config => {
260278
}
261279
const infrastructureLogging = stderr.toString();
262280
if (infrastructureLogging) {
263-
done(
281+
return done(
264282
new Error(
265283
"Errors/Warnings during build:\n" + infrastructureLogging
266284
)

0 commit comments

Comments
 (0)