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.
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 :)
It's pretty common for me to pass custom arguments to the
web-test-runner.config.js
spawn: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.