Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 23rd, 2012  |  syntax: None  |  size: 3.39 KB  |  hits: 6  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. //for IDE code completion
  2. //JsTestDriver assert
  3. this.fail = this.fail || function () {};
  4. this.assert = this.assert || function (actual) {};
  5. this.assertTrue = this.assertTrue || function (actual) {};
  6. this.assertFalse = this.assertFalse || function (actual) {};
  7. this.assertEquals = this.assertEquals || function (expected, actual) {};
  8. this.assertNotEquals = this.assertNotEquals || function (expected, actual) {};
  9. this.assertSame = this.assertSame || function (expected, actual) {};
  10. this.assertNotSame = this.assertNotSame || function (expected, actual) {};
  11. this.assertNull = this.assertNull || function (actual) {};
  12. this.assertNotNull = this.assertNotNull || function (actual) {};
  13. this.assertUndefined = this.assertUndefined || function (actual) {};
  14. this.assertNotUndefined = this.assertNotUndefined || function (actual) {};
  15. this.assertNaN = this.assertNaN || function (actual) {};
  16. this.assertNotNaN = this.assertNotNaN || function (actual) {};
  17. this.assertException = this.assertException || function (callback, error) {};
  18. this.assertNoException = this.assertNoException || function (callback) {};
  19. this.assertArray = this.assertArray || function (actual) {};
  20. this.assertTypeOf = this.assertTypeOf || function (expected, value) {};
  21. this.assertBoolean = this.assertBoolean || function (actual) {};
  22. this.assertFunction = this.assertFunction || function (actual) {};
  23. this.assertObject = this.assertObject || function (actual) {};
  24. this.assertNumber = this.assertNumber || function (actual) {};
  25. this.assertString = this.assertString || function (actual) {};
  26. this.assertMatch = this.assertMatch || function (regexp, actual) {};
  27. this.assertNoMatch = this.assertNoMatch || function (regexp, actual) {};
  28. this.assertTagName = this.assertTagName || function (tagName, element) {};
  29. this.assertClassName = this.assertClassName || function (className, element) {};
  30. this.assertElementId = this.assertElementId || function (id, element) {};
  31. this.assertInstanceOf = this.assertInstanceOf || function (constructor, actual) {};
  32. this.assertNotInstanceOf = this.assertNotInstanceOf || function (constructor, actual) {};
  33.  
  34. //SinonJS assert(sinon.assert.expose(this, {'includeFail' : false}); version)
  35. this.assertCalled = this.assertCalled || function (spy) {};
  36. this.assertNotCalled = this.assertNotCalled || function (spy) {};
  37. this.assertCalledOnce = this.assertCalledOnce || function (spy) {};
  38. this.assertCalledTwice = this.assertCalledTwice || function (spy) {};
  39. this.assertCalledThrice = this.assertCalledThrice || function (spy) {};
  40. this.assertCalledCount = this.assertCalledCount || function (spy, num) {};
  41. this.assertCalledOrder = this.assertCalledOrder || function (spy1, spy2 /* ... */) {};
  42. this.assertAlwaysCalledOn = this.assertAlwaysCalledOn || function (spy, obj) {};
  43. this.assertCalledOn = this.assertCalledOn || function (spy, obj) {};
  44. this.assertCalledWith = this.assertCalledWith || function (spy, arg1, arg2/*...*/) {};
  45. this.assertAlwaysCalledWith = this.assertAlwaysCalledWith || function (spy, arg1, arg2/*...*/) {};
  46. this.assertNeverCalledWith = this.assertNeverCalledWith || function (spy, arg1, arg2/*...*/) {};
  47. this.assertCalledWithExactly = this.assertCalledWithExactly || function (spy, arg1, arg2/*...*/) {};
  48. this.assertAlwaysCalledWithExactly = this.assertAlwaysCalledWithExactly || function (spy, arg1, arg2/*...*/) {};
  49. this.assertThrew = this.assertThrew || function (spy, exception) {};
  50. this.assertAlwaysThrew = this.assertAlwaysThrew || function (spy, exception) {};