Suite.prototype.testCompleted = function()

in jones-test/lib/Suite.js [275:307]


Suite.prototype.testCompleted = function(testCase) {
  var tc, index;
  var result = testCase.result;
  switch (testCase.phase) {
    case 0:     // the smoke test completed
      this.smokeTestHasFailed = testCase.failed || testCase.skipped;
      return this.startConcurrentTests(result);

    case 1:     // one of the concurrent tests completed
      if (++this.numberOfConcurrentTestsCompleted === this.numberOfConcurrentTests) {
        return this.startSerialTests(result);   // go on to the serial tests
      }
      return false;

    case 2:     // one of the serial tests completed
      index = testCase.index + 1;
      if (index < this.tests.length) {
        tc = this.tests[index];
        if (tc.phase === 2) {
          this.startNextSerialTest(index, result);
        }
        else if (tc.phase === 3) {
          this.startClearSmokeTest(result);
        }
        return false;
      }
      /* Done */
      return true;

    case 3:   // the clear smoke test completed
      return true;
  }
};