如何修复两个package.json命令的空格分隔参数的Cypress警告?

如何修复两个package.json命令的空格分隔参数的Cypress警告?,cypress,package.json,Cypress,Package.json,我打算有两个npm命令。运行普通Cypress测试的人。另一个运行common+dev-Cypress测试的 在package.json中: "test:common": "cypress run -q --spec \"path/to/common/tests\"", "test:dev": "NODE_ENV=development npm run test:smoke:common \"pa

我打算有两个npm命令。运行普通Cypress测试的人。另一个运行common+dev-Cypress测试的

package.json
中:

"test:common": "cypress run -q --spec \"path/to/common/tests\"",
"test:dev": "NODE_ENV=development npm run test:smoke:common \"path/to/devEnv/tests\""
我收到以下Cypress警告:

⚠ Warning: It looks like you're passing --spec a space-separated list of arguments:

"tests/e2e/cypress/integration/common/**/*, tests/e2e/cypress/integration/formSpecific/falcon/dev/*"

This will work, but it's not recommended.

If you are trying to pass multiple arguments, separate them with commas instead:
  cypress run --spec arg1,arg2,arg3
  
The most common cause of this warning is using an unescaped glob pattern. If you are
trying to pass a glob pattern, escape it using quotes:
  cypress run --spec "**/*.spec.js"

你有什么建议吗?谢谢大家!

我认为您可以通过将您的
--spec
参数设置为建议中所述的glob来解决此问题。看起来是这样的

"test:common": "cypress run -q --spec \"path/to/common/tests/**/*.spec\"",