File tree Expand file tree Collapse file tree 2 files changed +27
-2
lines changed
Expand file tree Collapse file tree 2 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,13 @@ module.exports = {
1111 } ,
1212 environments : {
1313 globals : {
14- globals : Object . assign ( globals . browser , globals . mocha , {
14+ globals : Object . assign ( {
1515 cy : false ,
1616 Cypress : false ,
1717 expect : false ,
1818 assert : false ,
1919 chai : false ,
20- } ) ,
20+ } , globals . browser , globals . mocha ) ,
2121 parserOptions : {
2222 ecmaVersion : 2019 ,
2323 sourceType : 'module' ,
Original file line number Diff line number Diff line change 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+ } )
You can’t perform that action at this time.
0 commit comments