WhichAI
← All tasks

Coding

Write tests

Generate unit, integration or end-to-end tests for existing code.

Ranked from coding, reasoning, speed scores — no head-to-head votes for this task yet.

Coding · 60%Reasoning · 30%Speed · 10%

Start with this prompt

Written for this task. Fill in the bracketed parts.

Write tests for the code below using [test framework].

Cover the happy path, the edge cases, and the failure modes. I care more about
tests that would actually catch a regression than about coverage percentage.

For each test, a one-line comment on what breakage it's guarding against. Tell
me anything you found untestable as written, and why.

---
[paste the code]
  1. Perplexity
    Perplexity AI
    Strong data
    5.7
  2. 2
    Copilot
    Microsoft
    Strong data
    5.5
  3. 3
    DeepSeek
    DeepSeek
    Strong data
    5.4
  4. 4
    Claude
    Anthropic
    Strong data
    5.4
  5. 5
    Gemini
    Google
    Strong data
    5.4
  6. 6
    Grok
    xAI
    Strong data
    5.3
  7. 7
    ChatGPT
    OpenAI
    Strong data
    5.3
  8. 8
    Meta AI
    Meta
    Strong data
    5.2
  9. 9
    Mistral
    Mistral AI
    Strong data
    5.2

Disagree with this ranking?

Vote head-to-head and your answer feeds straight back into this board.

Help rank these →

Try another task