Pushes an test result to the index output queue

@method outputTestFinished
@param {object} data Event data
@chainable
555726
function (data) {
    data.assertionInfo = this.temporaryAssertions;
    data.browser = this.temp.browser;
    this.output.test[data.id] = this.templates.test(data);
    this.temporaryAssertions = [];
    return this;
  }
463109
function _failure(errors, test, result) {
  process.stdout.write('.'.red);
  failures.push({ errors: errors, test: test, result: result });
}
266098
def trigger_success(data=nil)
      event.success = true
      event.data = data
      event.trigger
    end
371578
function enqueueEvent( self, eventItem ) {
   if( self.eventQueue_.length === 0 ) {
      self.nextTick_( () => {
         const queuedEvents = self.eventQueue_;

         self.eventQueue_ = [];

         processWaitingPublishPromises( self, processQueue( self, queuedEvents ) );
      } );
   }
   self.eventQueue_.push( eventItem );
}
448615
function handleExecResult(m, workerIdx) {
	var job = jobs[m.context.jobID];
		
	job.cb(m.err, m.result);

	// Worker is finished.
	workerJobCount[workerIdx]--;
	dispatchWorkItems();
}
472974
function dispatchResult (error, data) {
    if (_cb.beforeAll) { _cb.beforeAll() }

    if (_cb.returnForAll) {
      _cb.returnForAll(error, data)
    } else if (!_isNullOrEmptyArray(error)) {
      var _error = _normalizeError(error)
      if (!_isNullOrEmptyArray(data)) {
        processErrorAndData(_error, data)
      } else {
        processError(_error)
      }
    } else {
      if (!_isNullOrEmptyArray(data)) {
        processData(data)
      } else {
        processNotFound()
      }
    }

    if (_cb.afterAll) { _cb.afterAll() }
  }
707153
function finishRendering(data){
			// If none object found with given id return error
			if(id && !data[0])
				return next();

			// If querying for id, then returns only the object
			if(id)
				data = data[0];

			// Render the json
			res.send(data);
		}
1351772
function () {
                if (this._expectedEventsList != null) {
                    this.$raiseEvent({
                        name : "failure",
                        testClass : this.$classpath,
                        testState : this._currentTestName,
                        description : 'Not all expected events have occured. First missing event (#'
                                + this._eventIndexInList + '): '
                                + this._expectedEventsList[this._eventIndexInList].name
                    });
                    this._expectedEventsList = null;
                }
            }
842940
function(){
      var data = {
        title: $('#new_item').val(),
        priority: todo.selected_priority,
        deadline: todo.create_deadline($('#due_in').val())
      }
      if (data.title == ''){
        return
      }
      $('#new_item').val('');
      todo.push_item(data); // Push data to CloudMine
    }
990257
function onStdout (data) {
      data = data.toString();
      haibu.emit('drone:stdout', 'info', data, meta);

      if (!responded) {
        stdout = stdout.concat(data.split('\n').filter(function (line) { return line.length > 0 }));
      }
    }
1286768
function(test) {
      if (jsl.indexOf(JSLitmus._queue, test) >= 0) return;
      JSLitmus._queue.push(test);
      JSLitmus.renderTest(test);
      JSLitmus._nextTest();
    }
477937
function (test) {
        var end = +(new Date());

        test.runTime = end - test.start;

        results[test.name] = {
            name : test.name,
            runTime : test.runTime,
            baseline : results["__baseline__"] ? (results["__baseline__"].runTime - test.runTime) : NaN
        };

        addSelector(test.selector, test.cfg.incremental);

        // Yeld before calling the callback
        setTimeout(function () {
            next(test);
        }, 15);
    }
1003316
function (data) {
    this.data.elapsedTime = data.elapsedTime;
    this.data.status = data.status;
    this.data.assertions = data.assertions;
    this.data.assertionsFailed = data.assertionsFailed;
    this.data.assertionsPassed = data.assertionsPassed;

    var contents = jsonxml(this.xml, {escape: true, removeIllegalNameCharacters: true, prettyPrint: true, xmlHeader: 'version="1.0" encoding="UTF-8"'});

    if (path.extname(this.dest) !== '.xml') {
      this.dest = this.dest + '/dalek.xml';
    }

    this.events.emit('report:written', {type: 'junit', dest: this.dest});
    this._recursiveMakeDirSync(path.dirname(this.dest.replace(path.basename(this.dest, ''))));
    fs.writeFileSync(this.dest, contents, 'utf8');
  }
952519
function logResults(data)
{
	var done,output,result;
	var nextIsReady = true;
	
	while (nextIsReady)
	{
		result = data.page.results[data.page.currentIndex];
		
		if (result !== undefined)
		{
			done = data.page.done===true && data.page.currentIndex>=data.page.results.length-1;
			
			output = logResult(result, done);
			
			if (output !== "") log(output);
			if (done === true) return;
			
			data.page.currentIndex++;
		}
		else
		{
			nextIsReady = false;
		}
	}
}
1093823
function JSONReporter(runner, options) {
  Base.call(this, runner, options);

  var self = this;
  var tests = [];
  var pending = [];
  var failures = [];
  var passes = [];

  runner.on(EVENT_TEST_END, function(test) {
    tests.push(test);
  });

  runner.on(EVENT_TEST_PASS, function(test) {
    passes.push(test);
  });

  runner.on(EVENT_TEST_FAIL, function(test) {
    failures.push(test);
  });

  runner.on(EVENT_TEST_PENDING, function(test) {
    pending.push(test);
  });

  runner.once(EVENT_RUN_END, function() {
    var obj = {
      stats: self.stats,
      tests: tests.map(clean),
      pending: pending.map(clean),
      failures: failures.map(clean),
      passes: passes.map(clean)
    };

    runner.testResults = obj;

    process.stdout.write(JSON.stringify(obj, null, 2));
  });
}
260786
function onData( addend ) {
		/**
		* FUNCTION: onData( newVal, encoding, clbk )
		*	Data event handler. Performs addition.
		*
		* @private
		* @param {Number} newVal - streamed data value
		* @param {String} encoding
		* @param {Function} clbk - callback to invoke after performing addition. Function accepts two arguments: [ error, chunk ].
		*/
		return function onData( newVal, encoding, clbk ) {
			clbk( null, newVal+addend );
		}; // end FUNCTION onData()
	}
426365
function() {
      while (JSLitmus._queue.length) {
        var test = JSLitmus._queue.shift();
        JSLitmus.renderTest(test);
      }
    }