markhuot / craft-pest

https://craft-pest.com
Other
38 stars 11 forks source link

Support passing pest options to craft pest/test command #26

Closed myleshyson closed 1 year ago

myleshyson commented 1 year ago

This adds support for passing pest options through the craft command through stdout. Works similarly to how npm handles passing options to scripts.

For example:

./craft pest/test -- --coverage --order-by random
myleshyson commented 1 year ago

Also added the XDEBUG_MODE=coverage environment variable to the running process whenever the --coverage flag is used.

That variable has to be set when using --coverage, so this makes it hassle free to see coverage whether running it on your host machine or running it via docker.

myleshyson commented 1 year ago

alright removed the bit that automatically set the xdebug variable. The more I think about it the more sense it makes to not automate any env values and just have the user define whatever they want/however they want when running the command.