Testing javascript with karmaJS