Skip to content

Commit 353a5a6

Browse files
committed
[Tests] disable non-functioning tests
1 parent a2e8c34 commit 353a5a6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/src/rules/order.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -3043,6 +3043,9 @@ context('TypeScript', function () {
30433043
// Type-only imports were added in TypeScript ESTree 2.23.0
30443044
.filter((parser) => parser !== parsers.TS_OLD)
30453045
.forEach((parser) => {
3046+
const supportsTypeSpecifiers = semver.satisfies(require('@typescript-eslint/parser/package.json').version, '>= 5');
3047+
const supportsImportTypeSpecifiers = parser !== parsers.TS_NEW || supportsTypeSpecifiers;
3048+
const supportsExportTypeSpecifiers = parser === parsers.TS_NEW && supportsTypeSpecifiers;
30463049
const parserConfig = {
30473050
parser,
30483051
settings: {
@@ -3527,7 +3530,7 @@ context('TypeScript', function () {
35273530
alphabetize: { order: 'asc' },
35283531
}],
35293532
errors: [
3530-
{ message: '`A` import should occur before type import of `Z`' },
3533+
{ message: `\`A\` import should occur before${supportsImportTypeSpecifiers ? ' type' : ''} import of \`Z\`` },
35313534
{ message: '`D` import should occur before import of `E`' },
35323535
{ message: '`G` import should occur before import of `L`' },
35333536
],
@@ -3553,7 +3556,7 @@ context('TypeScript', function () {
35533556
}],
35543557
}),
35553558

3556-
parser !== parsers.BABEL_OLD ? [
3559+
supportsExportTypeSpecifiers ? [
35573560
test({
35583561
code: `
35593562
export { type B, A };

0 commit comments

Comments
 (0)