language: node_js node_js: - "node" # Normally, travis runs your script in a docker container. # I've had firefox crash in docker containers (firefox tries to use linux namespaces, just like docker) # "sudo: required" causes travis to use a VM instead. sudo: required dist: trusty before_install: - sudo apt-get -qq update - sudo apt-get install -y xvfb openbox chromium-browser firefox install: - npm install script: - lsb_release -a - firefox --version - chromium-browser --version - Xvfb :100 -ac -noreset -screen 0 1024x768x16 & - export DISPLAY=:100.0 - export CHROME_BIN=/usr/bin/chromium-browser # Firefox can crash if you do not have a window manager # (for example when window.open() tries to maximize the new window) - openbox & - npm test