UNIT-TESTING-BASICS5 MIN READ
Name The Test So The Failure Explains Itself
Choose a behavior-oriented unit test name that documents the scenario and expected result.
You are adding a test for parseDate. When the input string is blank, the function should return null instead of throwing or guessing today's date.
Read the full lesson
Sign up free — one personalized lesson every day, matched to your role and goals.
Already have an account? Sign in