I'm trying to mock objects with Sinon.JS but installing it globally doesn't add the dependency with require(), so I tried using Npm.depends() but that didn't work at all with Meteor 0.8, and using Meteor.require() with meteor-npm only has Meteor defined within test().
Is there an easy way to use npm modules within tests? https://github.com/zvictor/laika-extended-example/blob/master/tests/%24setup.js uses
should
by installing it globally, but the https://www.npmjs.org/doc/faq.html says this shouldn't be used forrequire()
.I'm trying to mock objects with Sinon.JS but installing it globally doesn't add the dependency with
require()
, so I tried usingNpm.depends()
but that didn't work at all with Meteor 0.8, and usingMeteor.require()
withmeteor-npm
only hasMeteor
defined withintest()
.