By default, wallaby.js ships with and uses PhantomJs. If you would like to use Electron to run your tests in the latest Chromium/V8 environment, you may use the env setting to specify it.

All you have to do to run your tests in Electron, is to install Electron for your platform:

npm install electron --save-dev

and specify kind: 'electron' in your env setting in wallaby config:

module.exports = function () {
  return {
    files: [
      ...
    ],

    tests: [
      ...
    ],

    env: {
      kind: 'electron'
    }
  };
};

You may also use an absolute or a relative path (or a command if you have it in PATH). It may be useful if you would like to install the module globally or have the executable somewhere else inside or outside of your project.

module.exports = function () {
  return {
    files: [
      ...
    ],

    tests: [
      ...
    ],

    env: {
      kind: 'electron',
      runner: '/Users/user/path/to/electron'
    }
  };
};

Passing Electron BrowserWindow options

You may pass BrowserWindow options, that wallaby.js will use to create the window to run your tests in, by using env.options setting, for example:

module.exports = function () {
  return {
    files: [
      ...
    ],

    tests: [
      ...
    ],

    env: {
      kind: 'electron',
      options: { width: 400, height: 400 }
    }
  };
};