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