var c = new Observation(function() { var map = new Map(); source(); map.bind("foo", function(){ ok(true); }); map.attr({foo: "bar"}); //DISPATCH return map; });
setupRouteTest(function (iframe, route) { var appVM = new Map(); route.map(appVM); route.ready(); appVM.bind('action', function(ev, newVal) { strictEqual(newVal, '10'); }); appVM.attr('action', 10); // check after 30ms to see that we only have a single call setTimeout(function() { teardownRouteTest(); }, 5); });