jeresig / i18n-node-2

Lightweight simple translation module for node.js / express.js with dynamic json storage. Uses common __('...') syntax in app and templates.
MIT License
507 stars 79 forks source link

Mocha test fails because of global var match #38

Closed nilpath closed 9 years ago

nilpath commented 9 years ago

Hi,

I noticed that our mocha tests started failing when we added this module with the following error:

Error: global leak detected: match

We've solved it by running the mocha command with --globals match but it would be nice not to have to do this.

I've looked through i18n.js and I think that this could be solved by adding a var match;right before:

225: while ((match = regExp.exec(accept))){

I could make a pull request for it.

gjuchault commented 9 years ago

I think that has been fixed a while ago (expresso does not fails at all)