define([
	'async'
], function(async) {
	// function asyncSeries()
	// Runs a variable number of function arguments in an
	// async.series between calls to QUnit's stop and start
	// Each function can override the timeout by its return value
	return function() {
		var series = [];
		stop();
		for (var i = 0; i < arguments.length; i++) {
			(function(fn) {
				series.push(function(next) {
					setTimeout(next, fn() || 100);
				});
			}(arguments[i]));
		}
		async.series.apply(null, [series, start]);        
	}
});
