diff --git a/package.json b/package.json index 19ddc59dab5..f2a86c0429f 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "@types/node": "^15.0.3", "@typescript-eslint/eslint-plugin": "^4.14.1", "@typescript-eslint/parser": "^4.14.1", + "@webpack-cli/generators": "^2.2.0", "@webpack-cli/migrate": "^1.1.2", "coffeescript": "^2.5.1", "colorette": "^1.2.1", diff --git a/smoketests/helpers.js b/smoketests/helpers.js index 7af0cc10990..879bc69443a 100644 --- a/smoketests/helpers.js +++ b/smoketests/helpers.js @@ -43,9 +43,7 @@ const runTest = (package, cliArgs = [], logMessage, isSubPackage = false) => { proc.kill(); }, 30000); - const prompt = "Would you like to install"; let hasLogMessage = false, - hasPrompt = false, hasPassed = false; proc.stderr.on("data", (chunk) => { @@ -56,11 +54,7 @@ const runTest = (package, cliArgs = [], logMessage, isSubPackage = false) => { hasLogMessage = true; } - if (data.includes(prompt)) { - hasPrompt = true; - } - - if (hasLogMessage && hasPrompt) { + if (hasLogMessage) { hasPassed = true; proc.kill(); } diff --git a/smoketests/missing-command-packages/configtest.test.js b/smoketests/missing-command-packages/configtest.test.js index 66683b4d53f..00d109f1e2e 100644 --- a/smoketests/missing-command-packages/configtest.test.js +++ b/smoketests/missing-command-packages/configtest.test.js @@ -8,7 +8,7 @@ const isSubPackage = true; const configTest = () => { const args = ["configtest"]; const logMessage = - "For using this command you need to install: '@webpack-cli/configtest' package"; + "For using this command webpack-cli will need to install: '@webpack-cli/configtest' package"; return runTest(packageName, args, logMessage, isSubPackage); }; diff --git a/smoketests/missing-command-packages/generator.test.js b/smoketests/missing-command-packages/generator.test.js index c0c95b8a8e9..039e4b9b050 100644 --- a/smoketests/missing-command-packages/generator.test.js +++ b/smoketests/missing-command-packages/generator.test.js @@ -8,7 +8,7 @@ const isSubPackage = true; const initTest = () => { const args = ["init"]; const logMessage = - "For using this command you need to install: '@webpack-cli/generators' package"; + "For using this command webpack-cli will need to install: '@webpack-cli/generators' package"; return runTest(packageName, args, logMessage, isSubPackage); }; diff --git a/smoketests/missing-command-packages/info.test.js b/smoketests/missing-command-packages/info.test.js index 3bdbe8b17ab..346503ea11a 100644 --- a/smoketests/missing-command-packages/info.test.js +++ b/smoketests/missing-command-packages/info.test.js @@ -7,7 +7,8 @@ const isSubPackage = true; const infoTest = () => { const args = ["info"]; - const logMessage = "For using this command you need to install: '@webpack-cli/info' package"; + const logMessage = + "For using this command webpack-cli will need to install: '@webpack-cli/info' package"; return runTest(packageName, args, logMessage, isSubPackage); }; diff --git a/smoketests/missing-command-packages/serve.test.js b/smoketests/missing-command-packages/serve.test.js index f0621b9c613..18657fdbada 100644 --- a/smoketests/missing-command-packages/serve.test.js +++ b/smoketests/missing-command-packages/serve.test.js @@ -7,7 +7,8 @@ const isSubPackage = true; const serveTest = () => { const args = ["serve"]; - const logMessage = "For using this command you need to install: '@webpack-cli/serve' package"; + const logMessage = + "For using this command webpack-cli will need to install: '@webpack-cli/serve' package"; return runTest(packageName, args, logMessage, isSubPackage); };