Write unit tests
Write unit tests with [Jest/pytest] for the function below. Cover normal cases, edge cases and expected errors, and name each test after what it checks. [code]
Replace what’s in [ ] with your own
Tested, copy-ready prompts for the most popular AI tools. Replace the variables in [ ] with your own details.
Write unit tests with [Jest/pytest] for the function below. Cover normal cases, edge cases and expected errors, and name each test after what it checks. [code]
I have these tables: [tables and columns] Write an SQL query to [what you want]. Briefly explain each part and suggest an index if it would improve performance.
Refactor the code below to be clearer and easier to maintain without changing its behaviour: split long functions, improve names and remove duplication. Show the new code, then a list of changes. [code]
Write a [JavaScript] regular expression that matches [what you need]. Give 3 examples that match and 3 that don’t, and explain each part of the pattern.
Review the following code as an expert software engineer. Identify: 1) logic bugs 2) security vulnerabilities 3) performance issues 4) readability improvements. Rank them by severity and suggest a fix for each. ```[language] [code] ```
Build a responsive landing page for [product name], a [short description]. Include: hero with CTA, features grid (6 items), pricing table (3 tiers), testimonials, FAQ, footer. Use Tailwind, modern clean style.
I am getting this error in [language/framework]: [error message] Here is the related code: [code] Explain the cause simply, then give me the fix step by step.