API Docs for: 3.8.0
Show:

File: test/js/Results.js

  1. /**
  2.  * Convenience type for storing and aggregating
  3.  * test result information.
  4.  * @private
  5.  * @namespace Test
  6.  * @module test
  7.  * @class Results
  8.  * @constructor
  9.  * @param {String} name The name of the test.
  10.  */
  11. YUITest.Results = function(name){

  12.     /**
  13.      * Name of the test, test case, or test suite.
  14.      * @type String
  15.      * @property name
  16.      */
  17.     this.name = name;
  18.    
  19.     /**
  20.      * Number of passed tests.
  21.      * @type int
  22.      * @property passed
  23.      */
  24.     this.passed = 0;
  25.    
  26.     /**
  27.      * Number of failed tests.
  28.      * @type int
  29.      * @property failed
  30.      */
  31.     this.failed = 0;
  32.    
  33.     /**
  34.      * Number of errors that occur in non-test methods.
  35.      * @type int
  36.      * @property errors
  37.      */
  38.     this.errors = 0;
  39.    
  40.     /**
  41.      * Number of ignored tests.
  42.      * @type int
  43.      * @property ignored
  44.      */
  45.     this.ignored = 0;
  46.    
  47.     /**
  48.      * Number of total tests.
  49.      * @type int
  50.      * @property total
  51.      */
  52.     this.total = 0;
  53.    
  54.     /**
  55.      * Amount of time (ms) it took to complete testing.
  56.      * @type int
  57.      * @property duration
  58.      */
  59.     this.duration = 0;
  60. };

  61. /**
  62.  * Includes results from another results object into this one.
  63.  * @param {Test.Results} result The results object to include.
  64.  * @method include
  65.  * @return {void}
  66.  */
  67. YUITest.Results.prototype.include = function(results){
  68.     this.passed += results.passed;
  69.     this.failed += results.failed;
  70.     this.ignored += results.ignored;
  71.     this.total += results.total;
  72.     this.errors += results.errors;
  73. };

  74.