Skip to content

Commit 0863962

Browse files
committed
add check
1 parent 921d2ca commit 0863962

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests-integrations/flat-config.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import cp from 'child_process'
22
import path from 'path'
33
import assert from 'assert'
4+
import semver from 'semver'
5+
import { readPackageJson } from './helper'
46

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

2527
it('should work with flat config', async () => {
28+
29+
if (
30+
!semver.satisfies(
31+
process.version,
32+
readPackageJson(
33+
path.resolve(__dirname, './flat-config/node_modules/eslint')
34+
).engines.node
35+
)
36+
) {
37+
return
38+
}
39+
2640
const cliResult = cp.execSync(`${ESLINT} src/* --format=json`, {
2741
encoding: 'utf-8'
2842
})

0 commit comments

Comments
 (0)