Write unit tests for the function below. Language: [language] Testing framework: [e.g. Jest, pytest, PHPUnit, JUnit] Cover: - Typical inputs (happy path) - Edge cases: empty, zero, null/None, very large values, unusual characters - Invalid inputs and expected errors - Any branches or conditions in the code Rules: - On…
Coding & Development
Write unit tests for any function
Generate thorough unit tests that cover normal cases, edge cases and errors, using your testing framework of choice.