Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

global leak of 'h' #75

Closed
chrisdew opened this issue May 21, 2013 · 1 comment
Closed

global leak of 'h' #75

chrisdew opened this issue May 21, 2013 · 1 comment

Comments

@chrisdew
Copy link
Contributor

I'm trying to use mysql-native with mocha.

Mocha detects global leaks - e.g.

h = 42; // when 'h' has not been declared

instead of

var h = 42;

A typical error is:

1) The engine module "before each" hook:
Error: global leak detected: h

The error always involves 'h'. Does mysql-native use an 'h' without declaring it?

@sidorares
Copy link
Owner

Hard to remember. Easiest way to spot global variable leak is to add property setter, like

global.__defineSetter__('h', function() {
   console.log('property h leak!');
   console.trace();
})

chrisdew added a commit to chrisdew/nodejs-mysql-native that referenced this issue May 21, 2013
sidorares added a commit that referenced this issue May 22, 2013
sidorares added a commit that referenced this issue May 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants