Skip to content

Commit

Permalink
[Tests] disable non-functioning tests
Browse files Browse the repository at this point in the history
  • Loading branch information
manuth committed Sep 4, 2024
1 parent a2e8c34 commit b70cbaa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/src/rules/order.js
Original file line number Diff line number Diff line change
Expand Up @@ -3043,6 +3043,9 @@ context('TypeScript', function () {
// Type-only imports were added in TypeScript ESTree 2.23.0
.filter((parser) => parser !== parsers.TS_OLD)
.forEach((parser) => {
const supportsTypeSpecifiers = semver.satisfies(require('@typescript-eslint/parser/package.json').version, '>= 4');
const supportsImportTypeSpecifiers = parser !== parsers.TS_NEW || supportsTypeSpecifiers;
const supportsExportTypeSpecifiers = parser === parsers.TS_NEW && supportsTypeSpecifiers;
const parserConfig = {
parser,
settings: {
Expand Down Expand Up @@ -3527,7 +3530,7 @@ context('TypeScript', function () {
alphabetize: { order: 'asc' },
}],
errors: [
{ message: '`A` import should occur before type import of `Z`' },
{ message: `\`A\` import should occur before${supportsImportTypeSpecifiers ? ' type' : ''} import of \`Z\`` },
{ message: '`D` import should occur before import of `E`' },
{ message: '`G` import should occur before import of `L`' },
],
Expand All @@ -3553,7 +3556,7 @@ context('TypeScript', function () {
}],
}),

parser !== parsers.BABEL_OLD ? [
supportsExportTypeSpecifiers ? [
test({
code: `
export { type B, A };
Expand Down

0 comments on commit b70cbaa

Please sign in to comment.