function pollForQUnitDone (iPollInterval, fnCallback) {
		QUnit.begin(function () {
			_bQUnitDone = false;
		});

		var bCalled = false;
		if (!QUnit) {
			throw new Error("QUnitPause should start polling after QUnit is loaded!");
		} else if (_bQUnitDone) {
			fnCallback({
				qunitDone: true
			});
		} else if (shouldPoll()) {
			QUnit.done(function () {
				_bQUnitDone = true;
				if (!bCalled) {
					fnCallback({
						qunitDone: true
					});
				}
			});

			setTimeout(function () {
				if (!_bQUnitDone && !bCalled) {
					bCalled = true;
					fnCallback({
						qunitDone: false
					});
				}
			}, iPollInterval);
		}
	}
// iPollInterval (ms) - the time to wait before checking if QUnit is done
iPollInterval (ms) - the time to wait before checking if QUnit is done
iPollInterval ( ms ) - the time to wait before checking if QUnit is done
function pollForQUnitDone (iPollInterval, fnCallback) {
		QUnit.begin(function () {
			_bQUnitDone = false;
		});
		var bCalled = false;
		if (!QUnit) {
			throw new Error("QUnitPause should start polling after QUnit is loaded!");
		} else if (_bQUnitDone) {
			fnCallback({
				qunitDone: true
			});
		} else if (shouldPoll()) {
			QUnit.done(function () {
				_bQUnitDone = true;
				if (!bCalled) {
					fnCallback({
						qunitDone: true
					});
				}
			});
			setTimeout(function () {
				if (!_bQUnitDone && !bCalled) {
					bCalled = true;
					fnCallback({
						qunitDone: false
					});
				}
			}, iPollInterval);
		}
	}
function pollForQUnitDone ( iPollInterval , fnCallback ) { QUnit . begin ( function ( ) { _bQUnitDone = false ; } ) ; var bCalled = false ; if ( ! QUnit ) { throw new Error ( "QUnitPause should start polling after QUnit is loaded!" ) ; } else if ( _bQUnitDone ) { fnCallback ( { qunitDone : true } ) ; } else if ( shouldPoll ( ) ) { QUnit . done ( function ( ) { _bQUnitDone = true ; if ( ! bCalled ) { fnCallback ( { qunitDone : true } ) ; } } ) ; setTimeout ( function ( ) { if ( ! _bQUnitDone && ! bCalled ) { bCalled = true ; fnCallback ( { qunitDone : false } ) ; } } , iPollInterval ) ; } }
iPollInterval (ms) - the time to wait before checking if QUnit is done
iPollInterval ( ms ) - the time to wait before checking if QUnit is done