Created
February 9, 2016 13:25
-
-
Save thomasvanlankveld/891f706284d96ee34239 to your computer and use it in GitHub Desktop.
Chimp.js Meteor subscriptions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
}); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stuff = new Mongo.Collection('stuff'); | |
Meteor.publish('stuff', function() { return Stuff.find(); }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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