API Docs for: 3.10.3
Show:

File: test/js/ShouldFail.js

  1. /**
  2. * ShouldFail is subclass of AssertionError that is thrown whenever
  3. * a test was expected to fail but did not.
  4. *
  5. * @param {String} message The message to display when the error occurs.
  6. * @namespace Test
  7. * @extends YUITest.AssertionError
  8. * @module test
  9. * @class ShouldFail
  10. * @constructor
  11. */
  12. YUITest.ShouldFail = function (message){
  13.  
  14. //call superclass
  15. YUITest.AssertionError.call(this, message || "This test should fail but didn't.");
  16. /**
  17. * The name of the error that occurred.
  18. * @type String
  19. * @property name
  20. */
  21. this.name = "ShouldFail";
  22. };
  23.  
  24. //inherit from YUITest.AssertionError
  25. YUITest.ShouldFail.prototype = new YUITest.AssertionError();
  26.  
  27. //restore constructor
  28. YUITest.ShouldFail.prototype.constructor = YUITest.ShouldFail;
  29.