We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7ed2bd2 + 0abdc0a commit caf273fCopy full SHA for caf273f
1 file changed
test/Compiler.test.js
@@ -261,6 +261,25 @@ describe("Compiler", () => {
261
done();
262
});
263
264
+ it("should not emit on errors (watch)", function(done) {
265
+ const compiler = webpack({
266
+ context: __dirname,
267
+ mode: "production",
268
+ entry: "./missing",
269
+ output: {
270
+ path: "/",
271
+ filename: "bundle.js"
272
+ }
273
+ });
274
+ compiler.outputFileSystem = new MemoryFs();
275
+ const watching = compiler.watch({}, (err, stats) => {
276
+ watching.close();
277
+ if(err) return done(err);
278
+ if(compiler.outputFileSystem.existsSync("/bundle.js"))
279
+ return done(new Error("Bundle should not be created on error"));
280
+ done();
281
282
283
describe("Watching", () => {
284
let compiler;
285
beforeEach(() => {
0 commit comments