removed unnecessary check for undefined, converted all spaces to tabs, added check for number of mockjax calls, removed mockjax.clear as it is performed after each test