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

Allow passing custom arguments to CLI #2687

Open
DavidPeicho opened this issue Mar 28, 2024 · 1 comment
Open

Allow passing custom arguments to CLI #2687

DavidPeicho opened this issue Mar 28, 2024 · 1 comment

Comments

@DavidPeicho
Copy link

It's pretty common for me to pass custom arguments to the web-test-runner.config.js spawn:

npm run test -- --custom_path custom/path/to/something

However, it looks like process.argv is fully handled before invoking the configuration script. I think it could be valuable to allow passing custom arguments, process them in the config step, and ignore them in the CLI?

The only workaround that comes to my mind would be to wrap the CLI in another node script that handles process.argv, and forward what is necessary to the CLI.

@DavidPeicho
Copy link
Author

After digging in the code a bit, I realize that it's achievable via a custom script calling startTestRunner. If there could be a more direct way, that would even be better. Otherwise that will do :)

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

No branches or pull requests

1 participant