npm install --save @mindhive/meteormeteor add meteorhacks:unblock
FocusedView:meteor add ejsonbackdoorModule:meteor add xolvio:backdoorSimpleSchema:meteor add aldeed:collection2-coreapiRegistry.publishComposite:meteor add reywood:publish-composite- client
timeModule:meteor add mizzao:timesync(optional, will default to local machine time otherwise) hasRole:meteor add alanning:rolesofflineModule:meteor add ground:db@2.0.0-rc.7appMarketStore:meteor add cordova:cordova-plugin-device,
meteor add cordova:cordova-plugin-appinfoandmeteor add cordova:cordova-plugin-market
- See our example webapp
See our DI package.
This package also makes Meteor core services available in the appContext:
MeteorMongo: Meteor's Mongo, or in testing it is our ownTestMongo(see below)Accounts: with appropriate internal data reset each testRandomEJSONUsers: Meteor's 'users' Mongo collection (TestMongoin testing)apiRegistry: see below
...and only on the client:
Tracker: like Meteor's Tracker but will react to both Meteor and Mobx reactive changesapi: how to call methods on the serverstorage: HTML5 localStoragemongoMirror: high level mirroring of publications to Mobx domains and offline
Rather than calling Meteor.methods and Meteor.publish to create methods and publications
inject apiRegistry. This has a cleaner callback (no use of this), calls
unblock, and facilitates domain testing (see below).
Uses in memory MiniMongo instead of real Mongo collections to increase test speed.
But this can be override with withRealMongoCollection for cases where you need
to use functions not available in MiniMongo.
- Use
mockServerContextof@mindhvie/meteor/testto initialise modules in test- Most likely you'll want to import and pass
@mindhvie/meteor/test/mockMeteorCoreModuleFactoryas the first module intomockServerContext - This also sets up a fiber so Meteor code can be run in your tests
- Most likely you'll want to import and pass
- From the returned context get the mock
apiRegistrywhich cancallandsubscribeto methods and publications in the modules being tested