config.js 715 B

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