UNPKG

492 BJavaScriptView Raw
1const { expect } = require('chai')
2
3const Xvfb = require('../')
4
5describe('xvfb', function(){
6 beforeEach(function(){
7 this.xvfb = new Xvfb()
8 })
9
10 context('issue: #1', function(){
11 it('issue #1: does not mutate process.env.DISPLAY', function(){
12 delete process.env.DISPLAY
13
14 expect(process.env.DISPLAY).to.be.undefined
15
16 this.xvfb._setDisplayEnvVariable()
17 this.xvfb._restoreDisplayEnvVariable()
18
19 expect(process.env.DISPLAY).to.be.undefined
20 })
21 })
22})