testCaseDuplicates
Reports test cases that are identical to previous test cases.
✅ This rule is included in the flint logical presets.
When writing tests for lint rules, it’s possible to accidentally create deeply identical test cases. Doing so provides no added benefit for testing and is unnecessary.
Examples
Section titled “Examples”ruleTester.describe(rule, { valid: ["a", "a"],});ruleTester.describe(rule, { invalid: [ { code: ` a; `, snapshot: ` a; ~ Lint report for a. `, }, { code: ` a; `, snapshot: ` a; ~ Lint report for a. `, }, ],});ruleTester.describe(rule, { valid: ["a", "b"],});ruleTester.describe(rule, { invalid: [ { code: ` a; `, snapshot: ` a; ~ Lint report for a. `, }, { code: ` b; `, snapshot: ` b; ~ Lint report for b. `, }, ],});Options
Section titled “Options”This rule is not configurable.
Equivalents in Other Linters
Section titled “Equivalents in Other Linters”
Made with ❤️🔥 in Boston by
Josh Goldberg and contributors.