mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-25 10:30:39 -06:00
20 lines
351 B
JavaScript
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
|
|
},
|
|
}
|