Configuration file: Runner (environment)

Wallaby.js supports different environments including PhantomJs, Google Chrome, Chromium/V8 via Electron and node.js. By default, PhantomJs is used as the test runner environment. You may use the env configuration property to specify a different test runner or change the runner settings.

env.type should be set to 'node' to use node.js, or set to 'browser' to use a browser environment (PhantomJs or Electron). The default value is 'browser'.

env.kind should be set to 'chrome' to use locally installed Google Chrome as a test runner, or to 'electron' to use Electron test runner, or set to 'phantomjs' to use PhantomJs. The default value is 'phantomjs'.

env.runner should be set to your local node/phantomJs/electron path, or just node/phantomjs (or any other command) that is mapped to your test runner binary. If env.type is set to node but env.runner is not set, wallaby.js will use its own version of node.js or the system default one.

env.params.runner allows you to set space-separated spawned runner process flags.

The env.report404AsError boolean property allows you to report any 404 server hits as errors to Wallaby Console; the default value is false. It can be useful if you’d like to be alerted when your tests are requesting some missing resources or accessing missing server API, etc.

Please note that env settings are for test runner workers, not for preprocessors, postprocessor and compilers. If you need to pass some process.env settings to Babel compiler or Webpack postprocessor, you may do it by setting the properties right in wallaby.js configuration file. For example:

// whenever wallaby loads the config file (and later uses babel),// babel will know that we are in the `test` envprocess.env.BABEL_ENV='test';module.exports=function(wallaby){return{files:[...],tests:[...],compilers:{...}...};};