Skip to main content
idapt
HomeCodeAI ModelsPricing
Sign inStart free
  • Home
  • Pricing
  • AI Models
  • Image models
  • Voice models
  • Video models
  • Rankings
  • New models
  • Model status
  • Multi-Model Chat
  • Voice Mode
  • Voice HUD
  • Web Search
  • Image Generation
  • Video Generation
  • Audio Generation
  • Transcription
  • Drive
  • Credentials
  • Sharing
  • Workspaces
  • Tasks
  • Memory
  • Agents
  • Subagents
  • Automations
  • Skills
  • idapt Code
  • Code Execution
  • Computers
  • Computer Use
  • Computer Assist · Soon
  • Containers
  • Cloud Computers
  • Local AI
  • AI Gateway
  • API & SDK
  • CLI
  • MCP
  • Tunnels
  • All features →
  • LLM cost calculator
  • Token counter
  • Context window checker
  • Can I run it
  • Model picker quiz
  • Savings finder
  • Video cost estimator
  • Text to speech cost
  • Transcription cost
  • API endpoint tester
  • All free tools →
  • Blog
  • Use cases
  • Comparisons
  • Best of
  • Skills
  • Learn
  • Changelog
  • Help center
  • FAQ
  • Privacy
  • Compare all models
  • Support
  • idapt Code
  • Developers
  • Quickstarts
  • API reference
  • API pricing
  • CLI
  • MCP
  • Downloads
  • Desktop
  • Badges and embeds
© idapt[email protected]TermsPrivacy PolicyLegal noticeReport content
X (Twitter)
All skills
Code

Fix a failing test

Find why a test fails and fix the cause, not the assertion.

Fill it in

Where the test lives.

Paste the output, or name the test.

Run the whole suite before delivering.

Your prompt

Fix this failing test in [your repository or path].

Failure:
[the failure]

Reproduce it FIRST. A test you have not seen fail is a test you cannot know you
fixed, and the most common wasted change is one that makes a flaky test pass by
accident.

Then find out which is wrong: the test or the code. Both happen. A test
asserting yesterday's behaviour deserves to be rewritten; a test catching a real
regression deserves the code to change. Say which one you concluded and why,
because that judgement is the actual work and it is the part a reviewer checks.

Never make a test pass by weakening its assertion, deleting a case, or adding a
retry. If the real fix is out of scope, say so and leave it failing.

Run the whole suite before you deliver. A fix that breaks two other tests is not
a fix, and finding that out yourself is cheaper than finding it out in review.
Use Fix a failing testOpens with everything above already filled in.

Why this works

The instruction carrying the weight is "reproduce it first". A model handed a failing test and a codebase will confidently explain the failure from reading alone, and it is right often enough to be dangerous: the times it is wrong, the fix targets a cause that was never there and the test goes green for an unrelated reason. The second is the refusal to weaken an assertion. Making a test pass is trivially easy in the wrong direction, and it is the most common way a suite quietly stops protecting anything.

Questions

What if the test itself is wrong?
Then it rewrites the test and says so. Both outcomes are legitimate; what is not legitimate is changing one without telling you which it concluded.
Does it need my whole repository?
It needs enough to run the test. Point it at a repo it can clone, or a folder in your Drive.

More code skills

  • idapt Code
  • Fix a GitHub issue
  • Find security bugs

Use it now in a chat in 1 click

Use Fix a failing test
  • Ship a feature
  • Speed up slow code
  • Untangle a god function