[Solved] Testing a package that depends on an unreleased package

I am currently writing several packages which depend on each other:

For the sake of simplicity, let’s say that base is the base package and sub depends on it.
In reality there are some more packages involved.

I want to release base only after both packages’ tests have passed (so that I can fix base in case I forgot something that sub requires of it), but if I try to test sub via

$ meteor test-packages ./

I cannot get it to start as meteor cannot fetch base.

[[[[[ Tests ]]]]]                             

=> Started proxy.                             
=> Started MongoDB.                           
=> Errors prevented startup:                  
   
   While selecting package versions:
   error: unknown package: alon:base
   Required by: alon:sub 1.0.0
   
=> Your application has errors. Waiting for file change.

Is there a way to test sub before releasing base by fetching a local copy or some other means?

I would appreciate any leads.

I was able to perform the tests by creating a Meteor app and adding all of the unreleased dependencies as local packages.

I then issued

$ meteor test-packages packages/sub

from the main app directory and it worked.

1 Like