Skip to content

Commit

Permalink
tests: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anshumanv committed Nov 10, 2020
1 parent 19a4c8f commit d1f9bbd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions test/build-warnings/warnings.test.js
Expand Up @@ -21,7 +21,7 @@ describe('warnings', () => {
const json = JSON.parse(stdout);

expect(json['hash']).toBeDefined();
expect(json['warnings']).toHaveLength(1);
expect(json['warnings']).toHaveLength(2);
// `message` for `webpack@5`
expect(json['warnings'][0].message ? json['warnings'][0].message : json['warnings'][0]).toMatch(/Can't resolve/);
});
Expand All @@ -43,7 +43,7 @@ describe('warnings', () => {
const json = JSON.parse(data);

expect(json['hash']).toBeDefined();
expect(json['warnings']).toHaveLength(1);
expect(json['warnings']).toHaveLength(2);
// `message` for `webpack@5`
expect(json['warnings'][0].message ? json['warnings'][0].message : json['warnings'][0]).toMatch(/Can't resolve/);

Expand Down
4 changes: 2 additions & 2 deletions test/defaults/output-defaults.test.js
Expand Up @@ -9,8 +9,8 @@ describe('output flag defaults', () => {

expect(stderr).toBeFalsy();
expect(exitCode).toBe(0);
// Should not print warning about config fallback, as we have production as default
expect(stdout).not.toContain('option has not been set, webpack will fallback to');
// Should print warning about config fallback
expect(stdout).toContain('option has not been set, webpack will fallback to');
stat(resolve(__dirname, './binary/main.js'), (err, stats) => {
expect(err).toBe(null);
expect(stats.isFile()).toBe(true);
Expand Down
2 changes: 1 addition & 1 deletion test/merge/config/merge-config.test.js
Expand Up @@ -8,7 +8,7 @@ const { run } = require('../../utils/test-utils');
describe('merge flag configuration', () => {
it('merges two configurations together', () => {
const { stdout, stderr, exitCode } = run(__dirname, ['--config', './1.js', '-c', './2.js', '--merge'], false);
expect(stdout).not.toContain('option has not been set, webpack will fallback to');
expect(stdout).toContain('option has not been set, webpack will fallback to');
expect(existsSync(resolve(__dirname, './dist/merged.js'))).toBeTruthy();
expect(stderr).toBeFalsy();
expect(exitCode).toBe(0);
Expand Down

0 comments on commit d1f9bbd

Please sign in to comment.