Unit testing is when you write a test for each unit (or each function/method) in a program. Each unit test is made up of assertion statements.
assertEqual: This can only be used to check scalar values (numbers or strings), not objects or arrays.
assertWithinRange: This checks if output is within a certain range.
assertArraysEqual: To assert that two arrays are equal, you must first check that they’re both equal in values and lengths.
assertObjectsEqual: objects must be converted to strings first to be compared.
How to call an assertion:
assertEqual(findLongestPalindrome('racecar hannah'), 'racecar', 'finds longest of two palindromes');