]> git.ipfire.org Git - thirdparty/vuejs/create-vue.git/commitdiff
fix: revert the `--tests` flag behavior
authorHaoqun Jiang <haoqunjiang@gmail.com>
Tue, 13 Jun 2023 07:19:40 +0000 (15:19 +0800)
committerHaoqun Jiang <haoqunjiang@gmail.com>
Tue, 13 Jun 2023 07:53:45 +0000 (15:53 +0800)
Fixes #297

To avoid confusions, the `--tests` flag should include exact *one* set
of test configurations. In the previous versions, it was Vitest for unit
testing and Cypress for E2E testing.
So for consistency, we remove the newly added Nightwatch template from
it.

But as we have more and more testing options, I would encourage everyone
to specify the name of the testing framework they want to use, rather
than use the general `--tests` flag. It would also be less prone to bugs

index.ts

index 89c56028452de49a4a916dd32b07cc0c6321141a..b5fd686793831e02c21823002fdbcf0d9b5750f7 100755 (executable)
--- a/index.ts
+++ b/index.ts
@@ -296,7 +296,7 @@ async function init() {
   const { needsE2eTesting } = result
   const needsCypress = argv.cypress || argv.tests || needsE2eTesting === 'cypress'
   const needsCypressCT = needsCypress && !needsVitest
-  const needsNightwatch = argv.nightwatch || argv.tests || needsE2eTesting === 'nightwatch'
+  const needsNightwatch = argv.nightwatch || needsE2eTesting === 'nightwatch'
   const needsNightwatchCT = needsNightwatch && !needsVitest
   const needsPlaywright = argv.playwright || needsE2eTesting === 'playwright'