check leaks flag for mocha