Return an object with all of the relevant information for the test.

@api private
@param {Object} test
@return {Object}
197856
function report(test) {
  return {
    test_file: test.file + ': ' + test.fullTitle(),
    start: test.start,
    end: test.end,
    exit_code: test.exit_code,
    elapsed: test.duration / 1000,
    error: errorJSON(test.err || {}),
    url: test.url,
    status: test.state
  };
}
1275867
function () {
    var scopes = fs.readdirSync('./test_scopes').filter(function (filename) {
      return filename[0] !== '.';
    });
    var config = {
      options: {
        color: false,
        interactive: false
      }
    };
    // Create a sub config for each test scope
    for (var idx in scopes) {
      var scope = scopes[idx];
      config['test_scopes_' + scope] = {
        options: {
          cwd: 'test_scopes/' + scope,
          production: false
        }
      };
    }
    return config;
  }
1365100
function find(test, paths, callback, one) {
  var state = {
    broken: false,
    checked: [],
    test: augment(test)
  }

  if (!callback) {
    callback = paths
    paths = [process.cwd()]
  } else if (typeof paths === 'string') {
    paths = [paths]
  }

  return visitAll(state, paths, null, one, done)

  function done(result) {
    callback(null, one ? result[0] || null : result)
  }
}
170981
function getReact (node, fn) {
        /*eslint-disable no-unused-vars*/
        const componentInstance = getComponentForDOMNode(node);

        if (!componentInstance) return null;

        delete window['%testCafeReactSelector%'];
        delete window['%testCafeReactEmptyComponent%'];
        delete window['%testCafeReactFoundComponents%'];

        if (typeof fn === 'function') {
            return fn({
                state: copyReactObject(componentInstance.state),
                props: copyReactObject(componentInstance.props),
                key:   componentInstance.key
            });
        }

        return {
            state: copyReactObject(componentInstance.state),
            props: copyReactObject(componentInstance.props),
            key:   componentInstance.key
        };
    }
142088
function createDone({ meta, emit, test: t, options, same }) {
  return function ondone(result) {
    let test = null;

    /* istanbul ignore if */
    if (same) {
      test = testsCache[t.title];
    } else {
      test = Object.assign({}, t, result, { isPending: false });
    }

    const { reason, ...testObject } = test;

    /* istanbul ignore if */
    if (options.snapshots) {
      testsCache[test.title] = testObject;
      testsCache[test.title].run = false;
    }

    if (test.isRejected) {
      meta.stats.fail += 1;

      test.reason.stack = cleanup(test.reason.stack);
      emit('fail', meta, test);

      /* istanbul ignore if */
      if (options.snapshots) {
        testsCache[test.title].reason = { stack: reason && reason.stack };
      }
    }
    if (test.isFulfilled) {
      if (test.skip) {
        emit('skip', meta, test);
      } else if (test.todo) {
        emit('todo', meta, test);
      } else {
        meta.stats.pass += 1;
        emit('pass', meta, test);
      }
    }

    emit('afterEach', meta, test);
    return test;
  };
}
855929
function binSearch(test) {
        var i0 = 0;
        var i1 = array.length;
        while (i0 < i1 - 1) {
          var i = Math.trunc((i0 + i1) / 2);
          if (test(i))
            i1 = i;  // Explore the left branch.
          else
            i0 = i;  // Explore the right branch.
        }
        return i1;
      }
1011430
function findToken(node, test) {
    let find = null
    traverse(node, {
        enter(child) {
            if (test(child)) {
                find = child
                this.break()
            }
        },
    })
    return find
}
139666
function (testObject) {
        if (testObject instanceof YUITest.TestSuite || testObject instanceof YUITest.TestCase) {
            this.items.push(testObject);
        }
        return this;
    }
229670
function parseJshintResults(fileName, showDetails) {
            var result = {};
            if (grunt.file.exists(fileName)) {
                var content = grunt.file.read(fileName);
                xml2js.parseString(content, {}, function (err, res) {
                    var consoleStatements = content.match(/(console.*)/g);
                    result = {
                        tests: Number(res.testsuite.$.tests),
                        failures: Number(res.testsuite.$.failures),
                        errors: Number(res.testsuite.$.errors),
                        consoleStatements: consoleStatements != null ? consoleStatements.length : 0
                    };

                    if (showDetails) {
                        var details = {};
                        res.testsuite.testcase.forEach(function (key) {
                            if(typeof key.failure !== 'undefined') {
                                var filename = key.$.name.substring(key.$.name.search(/[^\/]+$/g));
                                var failures = key.failure[0]._.replace(/\n/g, "###").split("###");
                                failures.shift();
                                failures.pop();
                                details[filename] = failures;
                            }
                        });
                        result.failureDetails = details;
                    }
                });
            }
            return result;
        }
101020
def _top_element(self):
        """"""
        top = etree.Element("testsuites")
        comment = etree.Comment("Generated for testrun {}".format(self.testrun_id))
        top.append(comment)
        return top
334694
function getObject(section) {
  var o = {}
    , i
    , k
    , name
    , method
    , sections = section ? [section] : keys
    , rusage = proc.usage();

  for(i = 0;i < sections.length;i++) {
    k = sections[i];
    name = k.charAt(0).toUpperCase() + k.substr(1);
    method = 'get' + name
    o[k] = {
      header: name,
      data: this[method](rusage)
    }
  }
  return o;
}
563866
function (test) {
        if (test.iteration >= test.cfg.repeat) {
            return completeTest(test);
        }
        test.iteration += 1;

        test.cfg.action.call(null, test.name, test.iteration - 1, generateTestCallback(test, this));
    }
1322606
function(test) {
			var context = this.loopContext;
			var forkContext = this.forkContext;
			var endOfInitSegments = forkContext.head;
			var testSegments = forkContext.makeNext(-1, -1);

			// Update state.
			context.test = test;
			context.endOfInitSegments = endOfInitSegments;
			context.continueDestSegments = context.testSegments = testSegments;
			forkContext.replaceHead(testSegments);
		}
218880
function () {
        var s = null;
        if (PFT.tester._suites.length > 0) {
            s = PFT.tester._suites[PFT.tester._suites.length - 1];
        }
        return s;
    }
835236
function (name, test) {
                        try {
                            if (_.isFunction (test)) {                               test () }
                                                else { _.each (test, function (fn) { fn () }) } }
                        catch (e) {
                            if (_.isAssertionError (e)) { var printedName = ((_.isArray (name) && name) || [name]).join ('.')
                                                          console.log (printedName + ':', e.message, '\n' + _.times (printedName.length, _.constant ('~')).join ('') + '\n')
                                                         _.each (e.notMatching, function (x) { console.log ('  •', x) }) }
                            throw e } }
63022
function createObject (type, options) {
    // retrieve the test functions for each of the objects properties
    var tests = {},
        prop;
    for (prop in type) {
      if (type.hasOwnProperty(prop)) {
        tests[prop] = ducktype(type[prop]).test;
      }
    }

    // non-empty object
    var isObject = basic.object.test;
    return new DuckType({
      name: options && options.name || null,
      test: function test (object) {
        var prop;
        
        // test whether we have an object
        if (!isObject(object)) {
          return false;
        }

        // test each of the defined properties
        for (prop in tests) {
          if (tests.hasOwnProperty(prop)) {
            if (!tests[prop](object[prop])) {
              return false;
            }
          }
        }
        return true;
      }
    });
  }
502349
function getAllActors() {
      try {
        storeBeingTested.getList(test.list, {}, function (list, error) {
          if (typeof error != 'undefined') {
            callback(error);
            return;
          }
          test.shouldBeTrue(list._items.length == 20, '20');
          getTomHanks();
        });
      }
      catch (err) {
        callback(err);
      }
    }