Skip to content

Commit 605d952

Browse files
committed
fix: more debug messages
1 parent 78d565a commit 605d952

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function Xvfb(options) {
1515
options = options || {}
1616
this._display = options.displayNum ? `:${options.displayNum}` : null
1717
this._reuse = options.reuse
18-
this._timeout = options.timeout || 2000
18+
this._timeout = options.timeout || options.timeOut || 2000
1919
this._silent = options.silent
2020
this._onStderrData = options.onStderrData || (() => {})
2121
this._xvfb_args = options.xvfb_args || []
@@ -134,9 +134,11 @@ Xvfb.prototype = {
134134
_setDisplayEnvVariable() {
135135
this._oldDisplay = process.env.DISPLAY
136136
process.env.DISPLAY = this.display()
137+
debug('setting DISPLAY %s', process.env.DISPLAY)
137138
},
138139

139140
_restoreDisplayEnvVariable() {
141+
debug('restoring process.env.DISPLAY variable')
140142
// https://github.com/cypress-io/xvfb/issues/1
141143
// only reset truthy backed' up values
142144
if (this._oldDisplay) {
@@ -210,7 +212,9 @@ Xvfb.prototype = {
210212
this.display()
211213
.toString()
212214
.replace(/^:/, '')
213-
return `/tmp/.X${displayNum}-lock`
215+
const filename = `/tmp/.X${displayNum}-lock`
216+
debug('lock filename %s', filename)
217+
return filename
214218
},
215219
}
216220

0 commit comments

Comments
 (0)