Skip to content

Commit

Permalink
test: only run unbound-method cases when using @typescript-eslint v7
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Aug 2, 2024
1 parent 56a7323 commit bca6dbd
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ if (semver.major(eslintVersion) !== 8) {
config.projects = config.projects.filter(
({ displayName }) => displayName !== 'lint',
);
}

// jest/unbound-method doesn't work when using @typescript-eslint v6
if (semver.major(typescriptESLintPluginVersion) === 6) {
for (const project of config.projects) {
project.testPathIgnorePatterns.push(
'<rootDir>/src/rules/__tests__/unbound-method.test.ts',
);
project.coveragePathIgnorePatterns.push(
'<rootDir>/src/rules/unbound-method.ts',
);
}
// jest/unbound-method seems to only be happy with @typescript-eslint v7 right now...
if (semver.major(typescriptESLintPluginVersion) !== 7) {
for (const project of config.projects) {
project.testPathIgnorePatterns.push(
'<rootDir>/src/rules/__tests__/unbound-method.test.ts',
);
project.coveragePathIgnorePatterns.push(
'<rootDir>/src/rules/unbound-method.ts',
);
}
}

Expand Down

0 comments on commit bca6dbd

Please sign in to comment.