avoid 'global leak detected' with mocha

this fix should be avoid the 'global leak detected' on mocha