Wallaby v2 has been released! 🚀 Open v2 docs.

Supported technologies: Google Chrome (headless)

By default, wallaby.js uses Google Chrome (headless) as its test runner. It also supports Node.js, Electron and PhantomJs.

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 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:

  • --headless
  • --disable-gpu
  • --disable-translate
  • --disable-extensions
  • --disable-background-networking
  • --safebrowsing-disable-auto-update
  • --disable-sync
  • --metrics-recording-only
  • --disable-default-apps
  • --no-first-run

For Linux environments, an additional two flags are also passed:

  • --no-sandbox
  • --disable-setuid-sandbox

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'
      }
    }
  };
};