Skip to content

Commit

Permalink
[Tests] skip tests that fail in eslint 8
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jul 2, 2022
1 parent 6396b9e commit 75f8adc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
3 changes: 2 additions & 1 deletion tests/src/rules/no-cycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ ruleTester.run('no-cycle', rule, {
parser: parsers.BABEL_ESLINT,
}),
]).concat(
testVersion('> 3', () => ({ // Dynamic import is not properly caracterized with eslint < 4
// TODO: enable for eslint 8+, just not for the old babel parser
testVersion('> 3 && < 8', () => ({ // Dynamic import is not properly characterized with eslint < 4
code: `import { foo } from "./${testDialect}/depth-one-dynamic"; // #2265 6`,
errors: [error(`Dependency cycle detected.`)],
parser: parsers.BABEL_ESLINT,
Expand Down
20 changes: 10 additions & 10 deletions tests/src/rules/no-unused-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,29 +253,29 @@ describe('dynamic imports', () => {

// test for unused exports with `import()`
ruleTester.run('no-unused-modules', rule, {
valid: [
test({
valid: [].concat(
semver.satisfies(eslintPkg.version, '< 8') ? test({
options: unusedExportsOptions,
code: `
export const a = 10
export const b = 20
export const c = 30
const d = 40
export default d
`,
`,
parser: parsers.BABEL_ESLINT,
filename: testFilePath('./no-unused-modules/exports-for-dynamic-js.js'),
}),
],
}) : [],
),
invalid: [
test({
options: unusedExportsOptions,
code: `
export const a = 10
export const b = 20
export const c = 30
const d = 40
export default d
export const a = 10
export const b = 20
export const c = 30
const d = 40
export default d
`,
parser: parsers.BABEL_ESLINT,
filename: testFilePath('./no-unused-modules/exports-for-dynamic-js-2.js'),
Expand Down

0 comments on commit 75f8adc

Please sign in to comment.