Created
March 4, 2013 06:44
-
-
Save normanzb/5080456 to your computer and use it in GitHub Desktop.
gadget test
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
| 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