From: Haoqun Jiang Date: Tue, 13 Jun 2023 07:19:40 +0000 (+0800) Subject: fix: revert the `--tests` flag behavior X-Git-Tag: v3.7.1~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=627f490c745a7ec121cb5d85cf2001bb06738a77;p=thirdparty%2Fvuejs%2Fcreate-vue.git fix: revert the `--tests` flag behavior 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 --- diff --git a/index.ts b/index.ts index 89c56028..b5fd6867 100755 --- 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'