diff --git a/src/__tests__/rules.test.ts b/src/__tests__/rules.test.ts index f90174218..eee9d9c32 100644 --- a/src/__tests__/rules.test.ts +++ b/src/__tests__/rules.test.ts @@ -18,6 +18,22 @@ describe('rules', () => { }); }); + it('should have a corresponding test for each rule', () => { + ruleNames.forEach(rule => { + const testPath = resolve( + __dirname, + '../rules/__tests__/', + `${rule}.test.ts`, + ); + + if (!existsSync(testPath)) { + throw new Error( + `Could not find test file for rule "${rule}" in path "${testPath}"`, + ); + } + }); + }); + it('should have the correct amount of rules', () => { const { length } = ruleNames; if (length !== numberOfRules) { diff --git a/src/rules/__tests__/no-deprecated-functions.ts b/src/rules/__tests__/no-deprecated-functions.test.ts similarity index 100% rename from src/rules/__tests__/no-deprecated-functions.ts rename to src/rules/__tests__/no-deprecated-functions.test.ts