1 |
|
2 | 'use strict'
|
3 |
|
4 | const globals = require('globals')
|
5 | const config = require('../index.js')
|
6 |
|
7 | describe('environments globals', () => {
|
8 | const env = config.environments.globals
|
9 |
|
10 | it('should not mutate globals', () => {
|
11 | expect(globals.browser).not.toHaveProperty('cy')
|
12 | expect(globals.mocha).not.toHaveProperty('cy')
|
13 | })
|
14 |
|
15 | it('should include other globals', () => {
|
16 | expect(env.globals).toEqual(expect.objectContaining(globals.browser))
|
17 | expect(env.globals).toEqual(expect.objectContaining(globals.mocha))
|
18 | })
|
19 |
|
20 | it('should include cypress globals', () => {
|
21 | expect(env.globals).toEqual(expect.objectContaining({
|
22 | cy: false,
|
23 | Cypress: false,
|
24 | }))
|
25 | })
|
26 | })
|