Skip to content

Commit

Permalink
[Tests] export: skip export * as tests in eslint < 6
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jun 23, 2020
1 parent 07dc92a commit 7ceae48
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions tests/src/rules/export.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { test, testFilePath, SYNTAX_CASES, getTSParsers } from '../utils'

import { RuleTester } from 'eslint'
import eslintPkg from 'eslint/package.json'
import semver from 'semver'

var ruleTester = new RuleTester()
, rule = require('rules/export')
Expand Down Expand Up @@ -201,13 +203,15 @@ context('TypeScript', function () {
filename: testFilePath('typescript-d-ts/file-2.ts'),
}, parserConfig)),

test({
code: `
export * as A from './named-export-collision/a';
export * as B from './named-export-collision/b';
`,
parser: parser,
}),
...(semver.satisfies(eslintPkg.version, '< 6' ? [] : [
test({
code: `
export * as A from './named-export-collision/a';
export * as B from './named-export-collision/b';
`,
parser: parser,
}),
])),
],
invalid: [
// type/value name clash
Expand Down

0 comments on commit 7ceae48

Please sign in to comment.