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

Mocha module detection #15

Closed

Conversation

marclitchfield
Copy link
Contributor

Support for loading mocha-as-promised when running outside of the mocha command line. Search modules starting at require.main to find the first module ending in mocha/lib/mocha.js, and assume that it is the running mocha module. Tested this technique on windows and linux, under grunt-mocha-test, grunt-mocha-hack and grunt-mocha-spawn. I'll keep trying to poke holes in the idea, but I think it should work.

PS thanks for mocha-as-promised, it cut lots of code out of our promise-based tests. Hopefully it makes its way into mocha someday. Have a good time at JSConf.

@domenic
Copy link
Owner

domenic commented Jun 9, 2013

Merged as 9068209, and published as 1.4.0, thanks so much!!

@domenic domenic closed this Jun 9, 2013
@marclitchfield marclitchfield deleted the mocha-module-detection branch June 12, 2013 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants