Commit To Three Useful Unit Tests
Create a concrete plan to add three focused unit tests to a real change in the next two days.
Add three focused unit tests to one active code change: normal behavior, boundary behavior, and error or invalid behavior. Use this for a real function, module, or class you will touch before your next PR review. My unit-testing commitment Code area: [function/module/class] Normal behavior test: [input/state] -> [expected result] Boundary behavior test: [edge/min/max/zero/empty] -> [expected result] Error or invalid behavior test: [bad input/failure state] -> [safe result or error] AAA check: Arrange only required state; Act once; Assert observable behavior. Review trigger: I will not request review until these tests pass locally. Did you add the normal, boundary, and error/invalid…
Sign up free — one personalized lesson every day, matched to your role and goals.
Already have an account? Sign in