Skip to content

Instantly share code, notes, and snippets.

@thomasvanlankveld
Created February 9, 2016 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomasvanlankveld/891f706284d96ee34239 to your computer and use it in GitHub Desktop.
Save thomasvanlankveld/891f706284d96ee34239 to your computer and use it in GitHub Desktop.
Chimp.js Meteor subscriptions
meteor-base # Packages every Meteor app needs to have
mobile-experience # Packages for a great mobile UX
mongo # The database Meteor supports right now
blaze-html-templates # Compile .html files into Meteor Blaze views
session # Client-side reactive dictionary for your app
jquery # Helpful client-side library
tracker # Meteor's client-side reactive programming library
standard-minifiers # JS/CSS minifiers run for production mode
es5-shim # ECMAScript 5 compatibility for older browsers.
ecmascript # Enable ECMAScript2015+ syntax in app code
# autopublish # Publish all data to the clients (for prototyping)
insecure # Allow all DB writes from clients (for prototyping)
xolvio:backdoor
module.exports = function() {
this.Given(/^"([^"]*)"$/, function (name) {
server.execute(function(thing) { Stuff.insert(thing) }, { name: name })
});
this.When(/^I look at stuff$/, function () {
server.subscribe('stuff');
});
this.Then(/^I see "([^"]*)"$/, function (name) {
var thing = server.execute(function() { return Stuff.findOne(); } );
expect(thing.name).toBe(name);
});
};
Stuff = new Mongo.Collection('stuff');
Meteor.publish('stuff', function() { return Stuff.find(); });
Feature: publish
@watch
Scenario: test
Given "thing"
When I look at stuff
Then I see "thing"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment