Created
June 25, 2011 20:57
-
-
Save Swizec/1046888 to your computer and use it in GitHub Desktop.
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
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