Changed the onTestComplete option to accept a node.js-style function

onTestComplete: function(result, callback) {
  // can throw synchronously
  if (...) throw error;
  // or can invoke callback synchronously/asynchronously
  // first parameter must be null in case of successful execution
  if (...) callback(null, newPassedValue);
  // or non-null in case of error
  if (...) callback(error);
}