Skip to content

Instantly share code, notes, and snippets.

@Swizec
Created Jun 25, 2011
Embed
What would you like to do?
my test:
'new track event': function (done) {
dispatcher.on('track new', function (url) {
// this fails with a mismatch
assert.equal(url, 'http://jc.is/lXFpfE');
done();
});
counter.track(3, 'http://jc.is/lXFpfE', function () {
});
},
the function:
track: function (id, url, callback) {
callback = callback || function () {};
/// some stuff is done
dispatcher.emit('track new', url);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment