TechnicalCollectible prompt

Unit tests for a function with edge cases

Get focused unit tests that cover normal cases, boundaries, and failure paths.

GitHub CopilotCursorClaude Code

Curated by Nvoka

Nvoka wordmark logo
Nvoka wordmark logoTechnical

Unit tests for a function with edge cases

Act as a test engineer. Write unit tests with {{test_framework}} for this function: {{function_code}} What it is supposed to do: {{expected_behavior}} Cover: - Typical inputs - Boundaries: empty, zero, one, maximum, and off-by-one values - Invalid input and error paths - Dates, time zones, locales, rounding, or currency, if the function touches them Rules: one behavior per test, descriptive test names, an arrange-act-assert structure, and no real network, file system, or clock (use fakes or mocks). If the code seems to contradict the expected behavior, write the test for the expected behavior and flag the mismatch. Never weaken an assertion just to make it pass. Return the complete test file, a table mapping each test to the behavior it proves, and any cases you couldn't test and why.
Technicalnvoka.com/library/nvoka-unit-tests-edge-casesScan to open
Technical

Unit tests for a function with edge cases

Get focused unit tests that cover normal cases, boundaries, and failure paths.

Nvoka logo

Curated by Nvoka

GitHub CopilotCursorClaude CodeClaude
Add to my library

Make it yours

Fill in the blanks and change any word. Only your copy changes, never the card.

Fill in the blanks

0 of 3 filled

Your prompt

Act as a test engineer. Write unit tests with {{test_framework}} for this function: {{function_code}} What it is supposed to do: {{expected_behavior}} Cover: - Typical inputs - Boundaries: empty, zero, one, maximum, and off-by-one values - Invalid input and error paths - Dates, time zones, locales, rounding, or currency, if the function touches them Rules: one behavior per test, descriptive test names, an arrange-act-assert structure, and no real network, file system, or clock (use fakes or mocks). If the code seems to contradict the expected behavior, write the test for the expected behavior and flag the mismatch. Never weaken an assertion just to make it pass. Return the complete test file, a table mapping each test to the behavior it proves, and any cases you couldn't test and why.
See all