Skip to content

Commit

Permalink
add check
Browse files Browse the repository at this point in the history
  • Loading branch information
codiini committed Jul 7, 2024
1 parent 921d2ca commit 0863962
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests-integrations/flat-config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import cp from 'child_process'
import path from 'path'
import assert from 'assert'
import semver from 'semver'
import { readPackageJson } from './helper'

const TEST_CWD = path.join(__dirname, 'flat-config')
const ESLINT = `.${path.sep}node_modules${path.sep}.bin${path.sep}eslint`
Expand All @@ -23,6 +25,18 @@ describe('Integration with flat config', () => {
})

it('should work with flat config', async () => {

if (
!semver.satisfies(
process.version,
readPackageJson(
path.resolve(__dirname, './flat-config/node_modules/eslint')
).engines.node
)
) {
return
}

const cliResult = cp.execSync(`${ESLINT} src/* --format=json`, {
encoding: 'utf-8'
})
Expand Down

0 comments on commit 0863962

Please sign in to comment.