lundi 31 décembre 2018

Is it possible to test meteor packages with npm peer dependencies?

I have an Atmosphere package that depends on meteor-accounts-t9n, an npm package. The guide recommends that peer dependencies be used, if possible, and to do a runtime check for the dependency using tmeasday:check-npm-versions.

That works great for my main application, but when I try to run the tests on my package the dependency is not found:

Uncaught Error: Cannot find module 'meteor-accounts-t9n'
at makeMissingError (modules-runtime.js?hash=b819d45cbf32aff410d740fac0364cb4088cd3f2:232)
at Module.require (modules-runtime.js?hash=b819d45cbf32aff410d740fac0364cb4088cd3f2:251)
at Module.moduleLink [as link] (modules.js?hash=655bc49ceeeeb29fd8970000aeef404082790b9b:302)
at at_error.js (at_error.js:1)
....

Is there a way to specify an npm peer dependency in package.js, its onTest() function, or somewhere else in the package?

Aucun commentaire:

Enregistrer un commentaire