Skip to content

Commit

Permalink
update flat globals test
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcC399 committed May 16, 2024
1 parent 6ed8cd5 commit e6d0b28
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
'use strict'

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

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

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))
expect(languageOptions.globals).toEqual(expect.objectContaining(globals.browser))
expect(languageOptions.globals).toEqual(expect.objectContaining(globals.mocha))
})

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

0 comments on commit e6d0b28

Please sign in to comment.