File size: 716 Bytes
bc20498
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* global describe, it, expect */
'use strict'

const globals = require('globals')
const config = require('../legacy.js')

describe('environments globals', () => {
  const env = config.environments.globals

  it('should not mutate globals', () => {
    expect(globals.browser).not.toHaveProperty('cy')
    expect(globals.mocha).not.toHaveProperty('cy')
  })

  it('should include other globals', () => {
    expect(env.globals).toEqual(expect.objectContaining(globals.browser))
    expect(env.globals).toEqual(expect.objectContaining(globals.mocha))
  })

  it('should include cypress globals', () => {
    expect(env.globals).toEqual(expect.objectContaining({
      cy: false,
      Cypress: false,
    }))
  })
})