-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
rename browser require() implementation #1193
Comments
ideally we'd use component or browserify for mocha :( component didn't exist at the time and browserify was in a weird place but it would be killer to get that out of the way, so many hacks in here for that |
If this helps, the problem with require colliding with other implementations started at version 1.12.0. For version 1.11.0, I can reassign the require at the global scope and the CommonJS implementation you're using inside Mocha doesn't get affected. Did you by chance, sometime between 1.11 and 1.12, do something that leaked the CommonJS require (the one you defined in mocha.js) in the global scope? I'm using node-webkit. If you checkout their tests, you'll see they're still using Mocha 1.7.4, and if you try to update to the latest version, you see problems. Most of them can be worked around, but I'm afraid the require issue is one that will need to be solved in Mocha itself... One suggestion, since it's an internal function, is to rename it as suggested by @jonathanong. Hope this helps, and thanks again for putting this great testing toolset together! |
A rename would definitely help; right now we're very close to being able to use Mocha with browserify but I think this is the only thing standing in our way. |
Any update on this issue? I'd really love to be able to use Mocha with Browserify. Do you have an ETA for when this will be supported? Or maybe a workaround for the time being? |
I'll try looking into it soon if it's still open. |
to something like
__require__
so stuff like https://github.com/visionmedia/node-requires and browserify don't try to parse it. wuttaya thinkThe text was updated successfully, but these errors were encountered: