Files
cypress/lib/exec/xvfb.js
2017-04-06 13:48:16 -04:00

20 lines
351 B
JavaScript

const os = require('os')
const Promise = require('bluebird')
const Xvfb = require('xvfb')
const xvfb = Promise.promisifyAll(new Xvfb({ silent: true }))
module.exports = {
start () {
return xvfb.startAsync()
},
stop () {
return xvfb.stopAsync()
},
isNeeded () {
return os.platform() === 'linux' && !process.env.DISPLAY
},
}