Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spec="spec1,spec2,spec3" under --env option fails with "Cannot parse as valid JSON" error #79

Closed
serhiikovalenkoextcheckrcom opened this issue Jul 5, 2023 · 3 comments
Labels

Comments

@serhiikovalenkoextcheckrcom

Hi!

npx cypress run --env split=true,spec="spec1,spec2,spec3" or npx cypress run --env spec="spec1,spec2,spec3" fails:
image

The same about npx cypress run --env split=2,splitIndex=0,spec="spec1,spec2,spec3"

It works fine with 1 spec, and I didn't succeed to find a syntax which allows to pass more than one spec.
I've seen there are examples like cypress run --env flags='{"feature-a":true,"feature-b":false}' in documentation, but didn't found examples like mine.

I'm wondering if there is a way to use it as described in ReadMe?

Thank you!

@bahmutov
Copy link
Owner

bahmutov commented Jul 6, 2023

Before I update the README, can you try passing specs using an environment variable, something like this:

$ SPEC="..." npx cypress run --browser chrome --env split=true

@serhiikovalenkoextcheckrcom
Copy link
Author

SPEC="..." npx cypress run --browser chrome --env split=true - this working, thank you!

@github-actions
Copy link

🎉 This issue has been resolved in version 1.3.14 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants