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 7118b65 commit c519475
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 () => {
// This test fails because the documentation url is not supported in eslint 7.0.0. Therefore, ignore this test.
testIf(ESLint.version !== '7.0.0')('printSummaryOfResults', async () => {
const results = await core.lint();
expect(core.formatResultSummary(results)).toMatchSnapshot();
});
Expand Down

0 comments on commit c519475

Please sign in to comment.