diff --git a/test/bail/bail-and-watch-warning.test.js b/test/bail/bail-and-watch-warning.test.js index 007f7ed2cdd..088d8717967 100644 --- a/test/bail/bail-and-watch-warning.test.js +++ b/test/bail/bail-and-watch-warning.test.js @@ -16,4 +16,11 @@ describe('bail and watch warning', () => { expect(stderr).toContain(`You are using "bail" with "watch". "bail" will still exit webpack when the first error is found.`); expect(stdout).toBeTruthy(); }); + + it('should log not log warning if both are not true', () => { + const { stderr, stdout } = run(__dirname, ['-c', 'third-webpack.config.js']); + + expect(stderr).not.toContain(`You are using "bail" with "watch". "bail" will still exit webpack when the first error is found.`); + expect(stdout).toBeTruthy(); + }); }); diff --git a/test/bail/third-webpack.config.js b/test/bail/third-webpack.config.js new file mode 100644 index 00000000000..b0b7ac2f33c --- /dev/null +++ b/test/bail/third-webpack.config.js @@ -0,0 +1,5 @@ +module.exports = { + entry: './src/first.js', + mode: 'development', + bail: true, +};