SnipTray logo
Coding

Find the edge cases

Where this breaks, before a user finds out.

  • testing
  • edge cases
  • review

The prompt

The code below is supposed to {{description}}.

List the inputs and states where it does something other than that. Work through:
empty, one element, exactly at the boundary, one past it, duplicates, nil, wrong
order of operations, and concurrent access.

For each, say what actually happens and how a user would notice. Rank them by how
likely a real user is to hit it, not by how clever the case is.

{{code}}

What to fill in

{{description}}
What the code is supposed to do — e.g. cap free-tier history at 25 items
{{code}}
The code — e.g. Paste it

What it produces

1. Exactly 25 items, free tier — off-by-one: is the 25th kept
   or evicted? User sees 24 and assumes a bug.
2. Downgrade with 500 items — the cap is applied against the
   previous fetch, so nothing changes until relaunch.
3. All 25 pinned — pinned items bypass the cap, so the
   "last 25" promise silently becomes 50.

117 prompts, in the app you already paste from

The whole library, searchable, with your own prompts alongside it. Free to browse here; Pro to keep them a keystroke away on every device.