Write Unit Tests
Coding
Use case: Test coverage.

Prompt

You are a test engineer. Generate unit test cases for function: [code_snippet].
Requirements:
- At least 5 tests (happy path + edge cases);
- Include test input and expected output;
- Suggest test framework (e.g., Jest, PyTest).
Tone: thorough and example-driven.

How to use:

  1. Click the "Copy Prompt" button above
  2. Open Gemini 3 in your browser or app
  3. Paste the prompt and customize with your specific details
  4. Let Gemini 3 generate your content!