From c43b93b0c9db7b77c00d8d8335e449cdc885ce1e Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Sun, 20 Sep 2020 08:10:26 +0530 Subject: [PATCH] tests: update --- test/bail/bail-and-watch-warning.test.js | 7 +++++++ test/bail/third-webpack.config.js | 5 +++++ 2 files changed, 12 insertions(+) create mode 100644 test/bail/third-webpack.config.js 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, +};