P
đź’»DeveloppementBeginnerAll AIs

Fix Failing Tests

Analyze and fix failing automated tests

Paste in your AI

Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.

This [TEST_FRAMEWORK] test is failing with the message: [PASTE_ERROR_MESSAGE]. Here is the test and the code under test: [PASTE_CODE]. Explain why the test is failing, whether the test or the code is incorrect, and how to fix the issue. If the test poorly validates the behavior, suggest a better testing strategy.

Personalize this prompt with Léa

Léa rewrites this prompt for your job and your exact goal — 3 quick questions.

Use Cases

Analyze and fix failing automated tests

Improve this prompt

Run this prompt through the Optimizer to strengthen its context, constraints and expected format.

Improve this prompt with the Optimizer

Comments

  • LĂ©aAI

    Incluez toujours le stack trace complet et le nom du framework en début de prompt : cela évite les malentendus sur l'assertion en échec. Pour les tests asynchrones (promesses, async/await), ajoutez les logs intermédiaires ; l’IA pourra alors détecter un appel manquant à `done()` ou un retour oublié. Variante utile : demander une version du test “en isolation” avec des mocks de dépendances pour identifier précisément la source de l’échec.

📬 Get new prompts every week

Join our newsletter and never miss a prompt.

Go further

Similar Prompts

đź’»DeveloppementIntermediateAll AIs

Implement rate limiting

Protect APIs from abuse

396
đź’»DeveloppementIntermediateAll AIs

Set up semantic versioning automation

Automate semantic versioning

406
đź’»DeveloppementIntermediateAll AIs

Prompt DALL-E to Create a Prototype

Creating visual prototypes is a crucial step in any product design process. Traditionally reserved for designers with specialized tools like Figma or Sketch, this phase can now be accelerated with DALL-E. By generating realistic visual mockups from text descriptions, DALL-E allows entrepreneurs, product managers, and developers to quickly materialize their ideas without advanced graphic skills. Whether you want to visualize a mobile app interface, a physical product, or an architectural concept, DALL-E transforms your descriptions into compelling visual representations. This approach considerably reduces the time between ideation and the first visual iteration, going from several days to a few minutes. The AI-generated prototype then serves as a basis for discussion with stakeholders, investors, or potential users, facilitating the collection of concrete feedback before investing in costly development. Mastering the art of prompting for prototype generation with DALL-E thus becomes a strategic skill for anyone wishing to innovate quickly and effectively.

447
đź’»DeveloppementIntermediateAll AIs

GitHub Copilot Prompt for Creating a REST API

GitHub Copilot has become an essential assistant for developers looking to accelerate the creation of REST APIs. Thanks to its direct integration into the code editor, it understands the context of your project and generates structured code in real time. Whether you work with Node.js and Express, Python and FastAPI, or Java and Spring Boot, Copilot adapts to your tech stack to produce endpoints conforming to REST conventions. The main challenge lies in formulating the prompt: a well-structured prompt yields a complete API with data validation, error handling, authentication, and documentation. A vague prompt, on the other hand, will produce generic code requiring many adjustments. In this guide, we offer an optimized prompt that fully leverages GitHub Copilot's capabilities to generate a professional, testable, production-ready REST API. You will also discover variants adapted to your experience level as well as practical tips to get the most out of this tool on a daily basis.

426