Guest User

Untitled

a guest
Jun 19th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. t = new TestHarness;
  2. t.test_expect_prop = function() {
  3. with(this) {
  4. ok(true, "foo")
  5. }
  6. }
  7. t.test_expect_prop.expect = 6;
  8.  
  9. t.test_die = function() {
  10. throw new Error("foo\nbar");
  11. }
  12.  
  13. t.test_noplan = function() {
  14. this.ok("no plan");
  15. this.same(1,new Number("1"), "numbers are the same");
  16. }
  17.  
  18. t.test_gt_ten = function () {
  19. this.expect(12);
  20. [this.ok(1, i) for (i in Util.Range(0,12) )];
  21. }
  22.  
  23. t.test_gt = function() {
  24. this.expect(1);
  25. this.ok();
  26. this.ok();
  27. this.ok();
  28. }
  29.  
  30. t.go();
Add Comment
Please, Sign In to add comment