Skip to content

Instantly share code, notes, and snippets.

@normanzb
Created March 4, 2013 06:44
Show Gist options
  • Select an option

  • Save normanzb/5080456 to your computer and use it in GitHub Desktop.

Select an option

Save normanzb/5080456 to your computer and use it in GitHub Desktop.
gadget test
var g1 = new Gadget();
var Extended = Gadget.extend({
'hub/test': function(topic, arg){
assert.same(test_args, arg)
return [test_args.reverse()];
}
});
var e1 = new Extended();
e1.start().then(function(){
g1.start().then(function(){
g1
.publish
.apply(g1, ['test', test_args])
.then(function(arg){
allSame(arg, test_args.reverse());
});
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment