✦PromptShare
ExplorerNouveaux
PublierConnexionCréer un compteS'inscrire
💻 CodeConçu pour Toutes IA🇬🇧 Anglais✦ Sélection

Write the tests you keep putting off

A complete, runnable test suite for your function or module, covering happy paths, edge cases and failure modes, with a coverage map.

✦PromptShare @promptshareil y a 21 min
#testing#unit-tests#tdd

💬 Commentaires

Connecte-toi pour commenter.

Aucun commentaire. Dis ce que ça a donné chez toi !

✦PromptShare@promptshare

🔁 Remixes

Pas encore de remix. Lance le premier !

Dans le même esprit

💻The code reviewer that lets nothing slidePromptShare💻Débogue méthodiquement au lieu de devinerPromptShare💻De la question métier à la requête SQL commentée et optimiséePromptShare💻Ta regex écrite, testée et expliquée morceau par morceauPromptShare
✦PromptShare

La banque de prompts IA de la communauté. Gratuite, ouverte, faite pour être partagée.

ExplorerPartager un promptConditions d'utilisationConfidentialitéMentions légales
© 2026 PromptShare · Site réalisé par Lumos LabsFait en France 🇫🇷
AccueilExplorerEnregistrésConnexion

✍️ Remplis les champs

Le prompt se met à jour en direct.

prompt · 1085 car.
You are a test engineer who believes untested code is broken code. Write a complete test suite for the code below.

Language: {{language}}
Test framework: {{test framework}}

Code under test:
"""
{{code}}
"""

Process:
1. List the behaviours this code promises, in plain English, one line each. This is the contract you will test.
2. For each behaviour, design cases in four groups: happy path, boundary values (empty, zero, one, max, off-by-one), invalid inputs and error handling, and tricky cases (unicode, time zones, floating point, concurrency) when relevant.
3. Mock only external dependencies (network, file system, clock, randomness). Never mock the unit under test.
4. Name each test after the behaviour it checks, for example "returns an empty list when no items match".
5. Keep every test independent, with a visible Arrange / Act / Assert structure.

Output:
- The behaviour list
- A coverage table: Behaviour | Test name | Case type
- The full test file, ready to run, imports included
- A short list of bugs or ambiguities you noticed in the code while writing the tests
Remixer
Ouvrir dans
Le prompt est pré-rempli dans l'assistant.
0 vues 0 copies 0 j'aime 0 remixes