Files
cypress/cli/lib/exec/xvfb.js
T
Brian Mann 101aac9c9b cli: move cli into subfolder, refactor cli scripts
-cleanup root monorepo files
-prevent downloading cypress binary when in development
-remove app-module-path
2017-06-05 17:26:51 -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
},
}