Fix missing $.ajax in karma tests bug