clever test loop in node