Closed SimonSimCity closed 7 years ago
After trying a bit more here and there, I found out that the update (for some reason) made this package useless, because the imported object isn't referenced any-longer but a new instance. This means, that the library I want to test has a different collection in my test-file than in the file to test, which makes this package useless to me ... It seems more and more to me that this came with the changes meteor did to the importing as they were working on dynamic imports.
Hi @SimonSimCity - this doesn't appear to be an issue with this package. Here's a quick repro showing that it's working with 1.5:
meteor create --bare stub-test
cd stub-test
meteor add hwillson:stub-collections
echo "import StubCollections from 'meteor/hwillson:stub-collections'; console.log(StubCollections);" > index.js
meteor
The above will log the proper StubCollections
object, which you can then call stub
on directly. Sounds like something else in your project might be impacting this?
Just saw your new response - okay, sounds like this isn't an issue with this package then. Closing - thanks!
After updating to Meteor 1.5, I see a strange import behavior on this module ...
I imported the module as you described in the documentation:
After updating Meteor I realized, that I can't call
StubCollections.stub()
but have to callStubCollections.default.stub()
instead. Is this a bug in Meteor or this library?