speedskater / babel-plugin-rewire

A babel plugin adding the ability to rewire module dependencies. This enables to mock modules for testing purposes.
843 stars 90 forks source link

Version 1.1 breaks usage with Mocha #190

Closed fix-fix closed 6 years ago

fix-fix commented 7 years ago

After updating babel-plugin-rewire to 1.1.0 from 1.0.0 Mocha throws an error after executing mocha.checkLeaks(), which prevents any tests from running: Error: global leak detected: __$$GLOBAL_REWIRE_NEXT_MODULE_ID__

Also why 1.1.0 is still not in the master branch, when it's published as latest tag on npm? It's confusing.

tdebarochez commented 7 years ago

The problem seems to be here: https://github.com/speedskater/babel-plugin-rewire/compare/version-1.1.0#diff-dc8b7ed135377c8e7840221454caa130R73

gruckus-gruckus commented 5 years ago

This still seems to be an issue in 1.2.0. Not sure why closed