Skip to content

Commit 009e507

Browse files
authored
test: fix version tests for ESLint v10 (#20274)
1 parent b44d426 commit 009e507

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

tests/lib/eslint/eslint.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12056,7 +12056,9 @@ describe("ESLint", () => {
1205612056
const version = eslintCLI.version;
1205712057

1205812058
assert.strictEqual(typeof version, "string");
12059-
assert(parseInt(version[0], 10) >= 3);
12059+
12060+
const majorVersion = version.slice(0, version.indexOf("."));
12061+
assert(parseInt(majorVersion, 10) >= 9);
1206012062
});
1206112063
});
1206212064

tests/lib/linter/linter.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18807,7 +18807,9 @@ var a = "test2";
1880718807
const version = linter.version;
1880818808

1880918809
assert.isString(version);
18810-
assert.isTrue(parseInt(version[0], 10) >= 3);
18810+
18811+
const majorVersion = version.slice(0, version.indexOf("."));
18812+
assert.isTrue(parseInt(majorVersion, 10) >= 9);
1881118813
});
1881218814
});
1881318815

0 commit comments

Comments
 (0)