Skip to content

Instantly share code, notes, and snippets.

@cecilemuller
Last active September 1, 2019 18:27
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cecilemuller/764afa5d4c67e17741d9bc258b45cdc1 to your computer and use it in GitHub Desktop.
Save cecilemuller/764afa5d4c67e17741d9bc258b45cdc1 to your computer and use it in GitHub Desktop.
Travis CI config to run headless Node tests via Xvfb
language: node_js
node_js:
- '6.9.1'
- '7.0.0'
sudo: false
addons:
apt:
packages:
- xvfb
install:
- export DISPLAY=':99.0'
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- npm install
{
"scripts": {
"test": "electron-mocha --renderer test/*.js"
},
"devDependencies": {
"electron": "latest",
"electron-mocha": "latest"
}
}
@hisivasankar
Copy link

This worked for me. I am using gemini framework

@tscheepers
Copy link

tscheepers commented Jul 16, 2019

Travis changed the way you use xvfb to use:

services:
  - xvfb

source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment