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

meteor stub and throwError #124

Closed
AdrienLemaire opened this issue Feb 2, 2014 · 2 comments
Closed

meteor stub and throwError #124

AdrienLemaire opened this issue Feb 2, 2014 · 2 comments

Comments

@AdrienLemaire
Copy link
Contributor

Hi,

I'm writing a real test for one of my models, and I want to test a method with various parameters and verify that the result is the one expected.

The problem is that this method calls Meteor.call, which is stubbed as emptyFunction.
I assume I should override that stub to return fake values, and I'll need another unit test to test the "call_url" server method.

But when I try this, the test fail, here it is:

error

Any idea why it's not throwing an error properly ? I'm not seeing the error message thrown by the method, and I can't get .should.throwError to work.
Also, how can I get more useful traceback messages ? those aren't helping.

@AdrienLemaire
Copy link
Contributor Author

When I try a very simple throw test, it fails too:

bug

@AdrienLemaire
Copy link
Contributor Author

Problem appears because I'm using Chai.Should instead of Should.js (different properties). Not related to rtd, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant