Skip to content

Commit

Permalink
tests: update
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Sep 20, 2020
1 parent 20b246c commit c43b93b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/bail/bail-and-watch-warning.test.js
Expand Up @@ -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();
});
});
5 changes: 5 additions & 0 deletions test/bail/third-webpack.config.js
@@ -0,0 +1,5 @@
module.exports = {
entry: './src/first.js',
mode: 'development',
bail: true,
};

0 comments on commit c43b93b

Please sign in to comment.