Back to all reviewers

Precise test pattern matching

zed-industries/zed
Based on 2 comments
Other

When identifying test patterns in code, use specific equality predicates (`#eq?`) instead of list inclusion predicates (`#any-of?`) when matching against a single value. This improves clarity and can avoid potential false positives in test detection.

Testing Other

Reviewer Prompt

When identifying test patterns in code, use specific equality predicates (#eq?) instead of list inclusion predicates (#any-of?) when matching against a single value. This improves clarity and can avoid potential false positives in test detection.

For example, when matching the “each” method for parameterized tests:

// Prefer this:
(#eq? @_property "each")

// Instead of this when there's only one value:
(#any-of? @_property "each")

This practice ensures more precise test pattern recognition, especially important for parameterized tests where accurate detection affects test execution and reporting.

2
Comments Analyzed
Other
Primary Language
Testing
Category

Source Discussions