mantoni / mochify.js

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

Rewrite: nested configuration does not get merged correctly #255

Closed m90 closed 2 years ago

m90 commented 2 years ago

When defining driver options we might run into situation where you have a command that relies on runtime information like:

mochify src/{,**}/*.test.js --config .mochifyrc.json --driver-option.executablePath $(which google-chrome)

And a config file like:

{
  "bundle": "browserify",
  "driver": "puppeteer",
  "driver_options": {
    "args": ["--no-sandbox", "--allow-chrome-as-root"]
  }
}

Right now, this does not seemt o work correctly as the cli args will override the options given in the config file entirely instead of merging them.