Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anshumanv committed Jan 9, 2021
1 parent 823ca31 commit ff8cb41
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
1 change: 1 addition & 0 deletions packages/webpack-cli/lib/webpack-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ class WebpackCLI {
} else {
pkg = commandName;
}

if (pkg !== 'webpack-cli' && !getPkg(pkg)) {
if (!allowToInstall) {
return;
Expand Down
1 change: 1 addition & 0 deletions test/help/help.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ describe('help', () => {
expect(stdout.match(/init\|c/g)).toHaveLength(1);
expect(stdout.match(/loader\|l/g)).toHaveLength(1);
expect(stdout.match(/plugin\|p/g)).toHaveLength(1);
expect(stdout.match(/migrate\|m/g)).toHaveLength(1);
expect(stdout.match(/configtest\|t/g)).toHaveLength(1);
expect(stdout).toContain("To see list of all supported commands and options run 'webpack --help=verbose'.");
expect(stdout).toContain('CLI documentation: https://webpack.js.org/api/cli/.');
Expand Down
1 change: 1 addition & 0 deletions test/version/version.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ describe('single version flag', () => {
expect(exitCode).toBe(0);
expect(stderr).toBeFalsy();
expect(stdout).toContain(`webpack-cli ${pkgJSON.version}`);
expect(stdout).toContain(`@webpack-cli/migrate`);
expect(stdout).toContain(`webpack ${webpack.version}`);
expect(stdout).toContain(`webpack-dev-server ${webpackDevServerPkgJSON.version}`);
});
Expand Down
11 changes: 0 additions & 11 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"declaration": true
},
"references": [
<<<<<<< HEAD
{
"path": "packages/generators"
},
Expand All @@ -30,9 +29,6 @@
{
"path": "packages/init"
},
{
"path": "packages/migrate"
},
{
"path": "packages/serve"
},
Expand All @@ -42,12 +38,5 @@
{
"path": "packages/configtest"
}
=======
{ "path": "packages/generators" },
{ "path": "packages/info" },
{ "path": "packages/init" },
{ "path": "packages/serve" },
{ "path": "packages/utils" }
>>>>>>> fix: deprecate migrate package
]
}

0 comments on commit ff8cb41

Please sign in to comment.