Skip to content

Commit

Permalink
tests: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Nov 11, 2020
1 parent 52a86f6 commit 6107f3f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions test/version/version-external-packages.test.js
Expand Up @@ -83,7 +83,7 @@ describe('version flag with external packages', () => {
});

it(' should throw error if invalid argument is present with --version flag', () => {
const { stderr, stdout, exitCode } = run(__dirname, ['init', 'abc', '--version'], false);
const { stderr, stdout, exitCode } = run(__dirname, ['init', 'abc', '--version', '--no-color'], false);

expect(exitCode).toBe(2);
expect(stderr).toContain(`[webpack-cli] Invalid command 'abc'`);
Expand All @@ -92,7 +92,7 @@ describe('version flag with external packages', () => {
});

it(' should throw error if invalid argument is present with version command', () => {
const { stderr, stdout, exitCode } = run(__dirname, ['init', 'abc', 'version'], false);
const { stderr, stdout, exitCode } = run(__dirname, ['init', 'abc', 'version', '--no-color'], false);

expect(exitCode).toBe(2);
expect(stderr).toContain(`[webpack-cli] Invalid command 'abc'`);
Expand All @@ -101,7 +101,7 @@ describe('version flag with external packages', () => {
});

it(' should throw error if invalid argument is present with -v alias', () => {
const { stderr, stdout, exitCode } = run(__dirname, ['init', 'abc', '-v'], false);
const { stderr, stdout, exitCode } = run(__dirname, ['init', 'abc', '-v', '--no-color'], false);

expect(exitCode).toBe(2);
expect(stderr).toContain(`[webpack-cli] Invalid command 'abc'`);
Expand Down
12 changes: 6 additions & 6 deletions test/version/version-multi-args.test.js
Expand Up @@ -23,7 +23,7 @@ describe('version flag with multiple arguments', () => {
});

it('throws error if invalid command is passed with version command', () => {
const { stdout, stderr, exitCode } = run(__dirname, ['version', 'abc'], false);
const { stdout, stderr, exitCode } = run(__dirname, ['version', 'abc', '--no-color'], false);

expect(exitCode).toBe(2);
expect(stdout).not.toContain(pkgJSON.version);
Expand All @@ -32,7 +32,7 @@ describe('version flag with multiple arguments', () => {
});

it('throws error if invalid option is passed with version command', () => {
const { stdout, stderr, exitCode } = run(__dirname, ['version', '--abc'], false);
const { stdout, stderr, exitCode } = run(__dirname, ['version', '--abc', '--no-color'], false);

expect(exitCode).toBe(2);
expect(stdout).not.toContain(pkgJSON.version);
Expand All @@ -41,7 +41,7 @@ describe('version flag with multiple arguments', () => {
});

it('throws error if invalid command is passed with --version flag', () => {
const { stdout, stderr, exitCode } = run(__dirname, ['--version', 'abc'], false);
const { stdout, stderr, exitCode } = run(__dirname, ['--version', 'abc', '--no-color'], false);

expect(exitCode).toBe(2);
expect(stdout).not.toContain(pkgJSON.version);
Expand All @@ -50,7 +50,7 @@ describe('version flag with multiple arguments', () => {
});

it('throws error if invalid option is passed with --version flag', () => {
const { stdout, stderr, exitCode } = run(__dirname, ['--version', '--abc'], false);
const { stdout, stderr, exitCode } = run(__dirname, ['--version', '--abc', '--no-color'], false);

expect(exitCode).toBe(2);
expect(stdout).not.toContain(pkgJSON.version);
Expand All @@ -59,7 +59,7 @@ describe('version flag with multiple arguments', () => {
});

it('throws error if invalid command is passed with -v alias', () => {
const { stdout, stderr, exitCode } = run(__dirname, ['-v', 'abc'], false);
const { stdout, stderr, exitCode } = run(__dirname, ['-v', 'abc', '--no-color'], false);

expect(exitCode).toBe(2);
expect(stdout).not.toContain(pkgJSON.version);
Expand All @@ -68,7 +68,7 @@ describe('version flag with multiple arguments', () => {
});

it('throws error if invalid option is passed with -v alias', () => {
const { stdout, stderr, exitCode } = run(__dirname, ['-v', '--abc'], false);
const { stdout, stderr, exitCode } = run(__dirname, ['-v', '--abc', '--no-color'], false);

expect(exitCode).toBe(2);
expect(stdout).not.toContain(pkgJSON.version);
Expand Down

0 comments on commit 6107f3f

Please sign in to comment.