-
Notifications
You must be signed in to change notification settings - Fork 5
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
QUnit-Mocha-UI need not depend on Mocha #6
Comments
The reference to Really, what should probably happen is that the caller's mocha should pass an instance of itself to the constructor function of the interface. That way it would be runtime dependency only, and I could get rid of the npm dependency on Mocha. |
You might want to look at peerDependencies in package.json and module.parent.require. Using another Mocha version's classes for the parent test run will likely break and is wrong anyways. A. On 22/05/2013, at 10:08 AM, Ian Taylor notifications@github.com wrote:
|
Yeah, module.parent.require and peerDependencies will probably work. It looks like peerDependencies hasn't made it into the npm docs yet, it's not in https://npmjs.org/doc/json.html. I'll give it a try and see how it goes. I think I'll also need to leave it in the devDependencies section to run the tests, as testrunner.js relies on it. |
Seems so. There's also this blog post: http://domenic.me/2013/02/08/peer-dependencies/ |
The
package.json
listsmocha
as a dependency, but in reality it's merely for extending the caller's Mocha and not using the one that comes with QUnit-Mocha-UI at all. Currently the extra copy of Mocha is just wasting disk space.There are also two unnecessary
Mocha
andSuite
assignments at the top ofqunit-mocha-ui.js
.If anything, it should more be a runtime dependency in this context, but I don't think NPM supports those...
The text was updated successfully, but these errors were encountered: