mantoni / mochify.js

☕️ TDD with Browserify, Mocha, Headless Chrome and WebDriver
MIT License
346 stars 57 forks source link

Cater for cases when puppeteer driver args is a string only #254

Closed m90 closed 2 years ago

m90 commented 2 years ago

This is a fixup for #252

It seems that when passing multiple values through the CLI like:

mochify --driver-options.args='--allow-chrome-as-root' --driver-options.args='--no-sandbox'

yargs will pass ['-allow-chrome-as-root', '--no-sandbox'] when passing a single value like

mochify --driver-options.args='--allow-chrome-as-root'

will yield the plain string '--allow-chrome-as-root'

m90 commented 2 years ago

Good news is that including this fix I can run all of my existing Mochify 8 suites just fine using @mochify/cli and the puppeteer driver, both in Docker and unboxed on my local setup.

mantoni commented 2 years ago

📦 Released in @mochify/driver-puppeteer v0.2.2.

m90 commented 2 years ago

Nice, this works well for me now when porting an existing mochify setup. Local, local in docker and in CircleCi all run well.