Bypass mocha global leak detection
Use mocha.setup({ui: 'bdd', globals: ['script*', 'jQuery*']});
to have mocha not to complain about global leaks when working with jQuery.
The jQuery*
part is specific for something like this attached to the window:
$(window).keydown(handler)
Written by Juan Hoyos
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Jquery
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#