DEDUPED Hot AI repos, turned into use cases Get 5 a day

How to locate the tests that cover a specific behavior with Jevgrep

Ask which tests exercise a behavior so an agent can run or extend the right suite.

Credentials. Test and source files in the searched root are sent to the selected provider, so exclude sensitive paths with --exclude when needed.

Who it is forA maintainer preparing a fix who needs to know which tests already cover a behavior such as retries on timeout.

The problemTest coverage for one behavior is spread across folders, and grep on a guessed name often misses it.

The outcomeA list of relevant test files and excerpts that show which tests cover the behavior, ready for the agent to run or extend.

What you need first

  • Node.js 22+ on macOS, Linux, or Windows
  • An API key for Vercel AI Gateway, TypeSafe, OpenRouter, OpenCode Zen, or a custom TypeSafe-compatible endpoint
  • A local checkout of the repository you want to search
  • A coding agent such as Claude Code or Codex to run the installed skill

Steps

  1. Run npm install -g @dzhng/jevgrep to install the CLI.
  2. Run jg auth to save your provider key.
  3. Run jg "Which tests cover retry behavior when a request times out?" . in the repository root.
  4. Read the returned file list and excerpts, then open the cited test files to confirm they match.

Prompt for your agent

In the repository at <target path>, run `jg` with the question "Which tests cover <behavior>?" and list each returned test file with its line references. Verify that each listed file exists and contains the test before you run the suite.

Caveat. The README describes the output as evidence, so a test that looks relevant still needs to be opened and read before the agent relies on it.

Share: X LinkedIn Hacker News Email Copy link

Disclaimer

Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page