Skip to content

Commit

Permalink
test: ignore test because it failed only in eslint 7.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mizdra committed Mar 22, 2022
1 parent dfa2c98 commit d89d18e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { ESLint, Linter } from 'eslint';
import { Core, DEFAULT_BASE_CONFIG } from './core.js';
import { cleanupFixturesCopy, getSnapshotOfChangedFiles, setupFixturesCopy } from './test-util/fixtures.js';

const testIf = (condition: boolean) => (condition ? test : test.skip);

const cwd = join(dirname(fileURLToPath(import.meta.url)), '..');

// Normalize `message` for the snapshot.
Expand Down Expand Up @@ -89,7 +91,8 @@ describe('Core', () => {
const results = await core.lint();
expect(normalizeResults(results)).toMatchSnapshot();
});
test('printSummaryOfResults', async () => {
// Ignore because it failed only in eslint 7.0.0.
testIf(ESLint.version !== '7.0.0')('printSummaryOfResults', async () => {
const results = await core.lint();
console.log(core.formatResultSummary(results));
expect(core.formatResultSummary(results)).toMatchSnapshot();
Expand Down

0 comments on commit d89d18e

Please sign in to comment.