xvfb-maybe

Runs xvfb-run only if you need to, useful for Electron unit tests

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
xvfb-maybe
12210.2.16 years ago7 years agoMinified + gzip package size for xvfb-maybe in KB

Readme

xvfb-maybe
This package runs an arbitrary executable / args under xvfb-run if the platform is Linux and DISPLAY isn't set. This is super useful for making Electron unit tests run correctly in CI environments while still working locally

Usage:

## On Windows or OS X, this just invokes electron-mocha
## On Linux, if we are in a headless environment, this will be equivalent 
## to xvfb-run electron-mocha ./test/*.js
xvfb-maybe electron-mocha ./test/*.js