xolvio / rtd

DEPRECATED: The Test Runner for Meteor
164 stars 37 forks source link

meteor stub and throwError #124

Closed AdrienLemaire closed 10 years ago

AdrienLemaire commented 10 years ago

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 commented 10 years ago

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

bug

AdrienLemaire commented 10 years ago

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