Exclusive test-case.

@param {Object} mocha
@param {Function} test
@returns {*}
778855
function(mocha, test) {
        test.parent._onlyTests = test.parent._onlyTests.concat(test);
        mocha.options.hasOnly = true;
        return test;
      }
686881
def any(self, func=None):
        
        if func is None:
            func = lambda x, *args: x
        self.antmp = False

        def testEach(value, index, *args):
            if func(value, index, *args) is True:
                self.antmp = True
                return "breaker"

        self._clean.each(testEach)
        return self._wrap(self.antmp)
10197
function clean(test) {
  return {
    title: test.title,
    fullTitle: test.fullTitle(),
    duration: test.duration,
    currentRetry: test.currentRetry()
  };
}
1022410
function( karma, jasmineEnv ) {

      var currentSuite = new SuiteNode();

      /**
       * Jasmine 2.0 dispatches the following events:
       *
       *  - jasmineStarted
       *  - jasmineDone
       *  - suiteStarted
       *  - suiteDone
       *  - specStarted
       *  - specDone
       */

      this.jasmineStarted = function( data ) {
         // TODO(vojta): Do not send spec names when polling.
         karma.info( {
            total: data.totalSpecsDefined,
            specs: getAllSpecNames( jasmineEnv.topSuite() )
         } );
      };

      this.jasmineDone = function() {
         karma.complete( {
            coverage: window.__coverage__
         } );
      };

      this.suiteStarted = function( result ) {
         currentSuite = currentSuite.addChild( result.description );
      };

      this.suiteDone = function( result ) {
         // In the case of xdescribe, only "suiteDone" is fired.
         // We need to skip that.
         if( result.description !== currentSuite.name ) {
            return;
         }

         currentSuite = currentSuite.parent;
      };

      this.specStarted = function( specResult ) {
         specResult.startTime = new Date().getTime();
      };

      this.specDone = function( specResult ) {
         var skipped = specResult.status === 'disabled' || specResult.status === 'pending';

         var result = {
            description: specResult.description,
            id: specResult.id,
            log: [],
            skipped: skipped,
            success: specResult.failedExpectations.length === 0,
            suite: [],
            time: skipped ? 0 : new Date().getTime() - specResult.startTime
         };

         // generate ordered list of (nested) suite names
         var suitePointer = currentSuite;
         while( suitePointer.parent ) {
            result.suite.unshift( suitePointer.name );
            suitePointer = suitePointer.parent;
         }

         if( !result.success ) {
            var steps = specResult.failedExpectations;
            for( var i = 0, l = steps.length; i < l; i++ ) {
               result.log.push( formatFailedStep( steps[i] ) );
            }
         }

         karma.result( result );
         delete specResult.startTime;
      };
   }
935758
function (name, f) {
    if (!f) throw new Error('Undefined test function');
    if (!/function[^\(]*\(([^,\)]*)/.test(f.toString())) {
      throw new Error('"' + name + '" test: Test is not a valid Function object');
    }
    this.loopArg = RegExp.$1;
    this.name = name;
    this.f = f;
  }
521629
function only( testName, expected, callback, async ) {
	var newTest;

	if ( focused )  { return; }

	QUnit.config.queue.length = 0;
	focused = true;

	if ( arguments.length === 2 ) {
		callback = expected;
		expected = null;
	}

	newTest = new Test({
		testName: testName,
		expected: expected,
		async: async,
		callback: callback
	});

	newTest.queue();
}
139666
function (testObject) {
        if (testObject instanceof YUITest.TestSuite || testObject instanceof YUITest.TestCase) {
            this.items.push(testObject);
        }
        return this;
    }
148467
function (test) {
    var ret = []
    for (var n = 0; n < batchTest.length; n++) {
      if (batchTest[n] === test) continue
      ret.push(batchTest[n])
    }
    batchTest = ret
  }
28725
public Object getExact(SimpleTest test) {
    for (int i = 0; i < size; i++) {
      if (ranges[i].correspondsTo(test))
        return ranges[i].target;
    }
    return null;
  }
1345954
function(test) {
            var ancestor = test.parent;
            while (ancestor) {
                if (ancestor == this) return true;
                ancestor = ancestor.parent;
            }
            return false;
        }
1356243
function assertThrows(test) {
    var error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Error;
    var contains = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];


    if (!Array.isArray(contains)) contains = [contains];

    var shouldErrorName = typeof error === 'string' ? error : error.name;

    var nonThrown = new Error('util.assertThrowsAsync(): Missing rejection' + (error ? ' with ' + error.name : ''));
    var ensureErrorMatches = function ensureErrorMatches(error) {
        // wrong type
        if (error.constructor.name != shouldErrorName) {
            return new Error('\n             util.assertThrowsAsync(): Wrong Error-type\n             - is    : ' + error.constructor.name + '\n             - should: ' + shouldErrorName + '\n             - error: ' + error.toString() + '\n             ');
        }
        // check if contains
        var errorString = error.toString();
        if (contains.length > 0 && (0, _utils.oneOfArrayNotInString)(contains, errorString)) {
            return new Error('\n               util.assertThrowsAsync(): Error does not contain\n               - should contain: ' + contains + '\n               - is string: ' + error.toString() + '\n             ');
        }
        return false;
    };

    return new Promise(function (res, rej) {
        var val = void 0;
        try {
            val = test();
        } catch (err) {
            var wrong = ensureErrorMatches(err);
            if (wrong) rej(wrong);else res(err);
            return;
        }
        if ((0, _isPromise2['default'])(val)) {
            val.then(function () {
                // has not thrown
                rej(nonThrown);
            })['catch'](function (err) {
                var wrong = ensureErrorMatches(err);
                if (wrong) rej(wrong);else res(err);
            });
        } else rej(nonThrown);
    });
}
1147465
function(input) {
		var needstesting = !this._matches.length;
		if (needstesting || this._matches.every(function(match) {
			return match.$instanceid !== input.$instanceid;
		})) {
			return this._maybeinput(input);
		}
		return false;
	}
376207
function (node) {

                //get relevant information
                var testName = node.testObject,
                    testCase = node.parent.testObject,
                    test = testCase[testName],

                    //get the "should" test cases
                    shouldIgnore = testName.indexOf("ignore:") === 0 ||
                                    !inGroups(testCase.groups, this._groups) ||
                                    (testCase._should.ignore || {})[testName];   //deprecated

                //figure out if the test should be ignored or not
                if (shouldIgnore){

                    //update results
                    node.parent.results[testName] = {
                        result: "ignore",
                        message: "Test ignored",
                        type: "test",
                        name: testName.indexOf("ignore:") === 0 ? testName.substring(7) : testName
                    };

                    node.parent.results.ignored++;
                    node.parent.results.total++;

                    this.fire({ type: this.TEST_IGNORE_EVENT,  testCase: testCase, testName: testName });

                    //some environments don't support setTimeout
                    if (typeof setTimeout != "undefined"){
                        setTimeout(function(){
                            YUITest.TestRunner._run();
                        }, 0);
                    } else {
                        this._run();
                    }

                } else {

                    //mark the start time
                    node._start = new Date();

                    //run the setup
                    this._execNonTestMethod(node.parent, "setUp", false);

                    //now call the body of the test
                    this._resumeTest(test);
                }

            }
1242811
function (coverage /*, testName */) {
        var store = this.store;
        Object.keys(coverage).forEach(function (key) {
            var fileCoverage = coverage[key];
            if (store.hasKey(key)) {
                store.setObject(key, utils.mergeFileCoverage(fileCoverage, store.getObject(key)));
            } else {
                store.setObject(key, fileCoverage);
            }
        });
    }
234738
function only( testName, callback ) {
	var newTest;

	if ( focused )  { return; }

	QUnit.config.queue.length = 0;
	focused = true;

	newTest = new Test( {
		testName: testName,
		callback: callback
	} );

	newTest.queue();
}
1083014
function makeParameterizedOnly(parameters, defaultIt) {
  return function(title, test) {
    const it = makeTestCaseDefiner(parameters, defaultIt);
    global.describe.only('', () => it(title, test));
  };
}
132923
function skip( testName ) {
	if ( focused )  { return; }

	var test = new Test( {
		testName: testName,
		skip: true
	} );

	test.queue();
}