API Docs for: 3.18.1
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. /**
  18. * The name of the error that occurred.
  19. * @type String
  20. * @property name
  21. */
  22. this.name = "ShouldFail";
  23.  
  24. };
  25.  
  26. //inherit from YUITest.AssertionError
  27. YUITest.ShouldFail.prototype = new YUITest.AssertionError();
  28.  
  29. //restore constructor
  30. YUITest.ShouldFail.prototype.constructor = YUITest.ShouldFail;
  31.