-
-
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
Would you be open to adding sinon.js to the project? #220
Comments
nope, much like the assertion libs there's little reason to include them directly |
plus stubs/mocks/spies are incredibly easy just by swapping out functions no need for libs :D |
it would be nice to add more to the wiki though I started this page https://github.com/visionmedia/mocha/wiki/Spies |
Yup, I did see that. I was thinking something that we could use in development, but you don't need to package with mocha when you release it. I started with swapping the functions, but I am too spoiled with a good spy framework like sinon. |
I really really really rarely "spy", IMO at that point you're not really testing APIs |
What if it's an external dependency, like console.error? |
I dont think we need it really |
ok, thanks! |
open to it but I still think that most cases people use spies are really not testing much other than the spy logic itself haha which isn't so useful |
haha once again im terrible at reading. I thought you were initially asking to add sinon to mocha in general. I still dont think we need it but yeah my bad!! |
no worries, thanks! |
Fixes mochajs#1674; provides support *much* needed for [mocha-phantomjs](https://github.com/nathanboktae/mocha-phantomjs) (see [mochajs#133](nathanboktae/mocha-phantomjs#133), [mochajs#220](nathanboktae/mocha-phantomjs#220), etc). Maintains support for running the XUnit reporter in a browser (unlike the previously reverted PR mochajs#1068). ping @alemangui, @nathanboktae Thanks all.
I need to spy or stub on some of the functions I am trying to test. Can I add sinon.js as a dependent project to mocha?
The text was updated successfully, but these errors were encountered: