How would I go about stubbing out specific remote method calls, i.e.
Meteor.apply in package testing? I’m using mocha, chai, and sinon with Velocity.
If I stub out
Meteor.call, it breaks Velocity since the test runner uses remote methods itself. This happens in the terminal (
meteor test-packages --velocity) and the HTML reporter (
meteor test-packages --driver-package respondly:test-reporter). The tests will report as passing but nothing’s actually happening.
This may be as much of a Sinon question as a Meter & Velocity one, but I can’t figure out any way to stub a method only when given certain arguments, otherwise let the function run like normal.