jQuery call back function testing