The original test for renderContact function seems just want to make sure the getPhoneDetails(become getContactDetails now) will be execute with correct number, and set mock callback function in getPhoneDetails. It seems will have dependency issue with renderContact and getContactDetails, but in order to make sure whole functionality in renderContact is correct, it's reasonable to return a validate details for finishing the renderContact logic.