API Docs for: 3.13.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. /**
  14. * Name of the test, test case, or test suite.
  15. * @type String
  16. * @property name
  17. */
  18. this.name = name;
  19.  
  20. /**
  21. * Number of passed tests.
  22. * @type int
  23. * @property passed
  24. */
  25. this.passed = 0;
  26.  
  27. /**
  28. * Number of failed tests.
  29. * @type int
  30. * @property failed
  31. */
  32. this.failed = 0;
  33.  
  34. /**
  35. * Number of errors that occur in non-test methods.
  36. * @type int
  37. * @property errors
  38. */
  39. this.errors = 0;
  40.  
  41. /**
  42. * Number of ignored tests.
  43. * @type int
  44. * @property ignored
  45. */
  46. this.ignored = 0;
  47.  
  48. /**
  49. * Number of total tests.
  50. * @type int
  51. * @property total
  52. */
  53. this.total = 0;
  54.  
  55. /**
  56. * Amount of time (ms) it took to complete testing.
  57. * @type int
  58. * @property duration
  59. */
  60. this.duration = 0;
  61. };
  62.  
  63. /**
  64. * Includes results from another results object into this one.
  65. * @param {Test.Results} result The results object to include.
  66. * @method include
  67. * @return {void}
  68. */
  69. YUITest.Results.prototype.include = function(results){
  70. this.passed += results.passed;
  71. this.failed += results.failed;
  72. this.ignored += results.ignored;
  73. this.total += results.total;
  74. this.errors += results.errors;
  75. };
  76.