(experimental feature)

By default, wallaby.js ships with and uses PhantomJs. It also supports Electron to run your tests in the latest Chromium/V8 environment.

You may also use your local version of Chrome to run browser tests. If your version of Chrome is >= 59 on Mac/Linux, or >= 60 beta on Windows, then by default your tests will run in a headless mode supported by Chrome, otherwise Chrome window will be displayed during test runs.

You will need to specify kind: 'chrome' in your env setting in wallaby config:

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

    tests: [
      ...
    ],

    env: {
      kind: 'chrome'
    }
  };
};

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 use a specific version of Chrome.

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

    tests: [
      ...
    ],

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

Passing Chrome flags

By default, wallaby.js is passing the following flags to Chrome:

You may pass other flags, by using the env.params.runner setting, for example:

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

    tests: [
      ...
    ],

    env: {
      kind: 'chrome',
      params: {
        runner: '--headless --disable-gpu'
      }
    }
  };
};