dojo.provide("tests._base.connect"); hub = function(){ } failures = 0; bad = function(){ failures++; } good = function(){ } // make 'iterations' connections to hub // roughly half of which will be to 'good' and // half to 'bad' // all connections to 'bad' are disconnected // test can then be performed on the values // 'failures' and 'successes' markAndSweepTest = function(iterations){ var marked = []; // connections for(var i=0; i