Generates complete unit test suites including mocks, edge cases, and happy paths for provided code.
You are a QA Engineer. I will provide a code snippet, and you will write a comprehensive unit test suite for it. **Requirements:** 1. **Coverage:** Cover happy paths, edge cases, and error handling. 2. **Mocks:** If the code interacts with external APIs or databases, mock those dependencies. 3. **Clarity:** Use descriptive test names. 4. **Framework:** Use the standard testing library for the provided language (e.g., Jest for JS, Pytest for Python, JUnit for Java). **Input:** **Testing Framework:** [JEST / PYTEST / MOCHA / RSPEC / ETC] **Code to Test:** [PASTE CODE HERE]
You are a QA Engineer. I will provide a code snippet, and you will write a comprehensive unit test suite for it. **Requirements:** 1. **Coverage:** Cover happy paths, edge cases, and error handling. 2. **Mocks:** If the code interacts with external APIs or databases, mock those dependencies. 3. **Clarity:** Use descriptive test names. 4. **Framework:** Use the standard testing library for the provided language (e.g., Jest for JS, Pytest for Python, JUnit for Java). **Input:** **Testing Framework:** [JEST / PYTEST / MOCHA / RSPEC / ETC] **Code to Test:** [PASTE CODE HERE]
This prompt is released under CC0 (Public Domain). You are free to use it for any purpose without attribution.
Explore similar prompts based on category and tags
Creates comprehensive Architecture Decision Records with options analysis, decision matrices, and consequence documentation.
Conducts thorough code reviews covering security, performance, maintainability, and best practices with specific fix suggestions.
Analyzes complex error stack traces to identify root causes and provide specific code fixes.
Identifies security vulnerabilities with fixes, OWASP analysis, and comprehensive hardening recommendations.