Skip to content

Commit

Permalink
[Tests] skip 2020 test in eslint < 6
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Nov 10, 2021
1 parent 3fbc252 commit 790d9af
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/src/rules/no-import-module-exports.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'path';
import { RuleTester } from 'eslint';

import { test } from '../utils';
import { test, testVersion } from '../utils';

const ruleTester = new RuleTester({
parserOptions: { ecmaVersion: 6, sourceType: 'module' },
Expand All @@ -15,7 +15,7 @@ const error = {
};

ruleTester.run('no-import-module-exports', rule, {
valid: [
valid: [].concat(
test({
code: `
const thing = require('thing')
Expand Down Expand Up @@ -64,7 +64,7 @@ ruleTester.run('no-import-module-exports', rule, {
`,
filename: path.join(process.cwd(), 'tests/files/missing-entrypoint/cli.js'),
}),
test({
testVersion('>= 6', () => ({
code: `
import fs from 'fs/promises';
Expand Down Expand Up @@ -113,8 +113,8 @@ ruleTester.run('no-import-module-exports', rule, {
parserOptions: {
ecmaVersion: 2020,
},
}),
],
})) || [],
),
invalid: [
test({
code: `
Expand Down

0 comments on commit 790d9af

Please sign in to comment.