Last Updated: February 25, 2016
·
3.491K
· elhoyos

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)