File: long-slow-many.js

package info (click to toggle)
node-tap 12.0.1%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 3,996 kB
  • sloc: javascript: 13,674; sh: 75; makefile: 73
file content (37 lines) | stat: -rw-r--r-- 738 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
var t = require('../lib/tap.js')
t.plan(2)

t.test('gun show', function (t) {
  t.plan(100)

  var n = 0
  var i = setInterval(function () {
    if (n % 123 === 5) {
      t.fail('FIRE!')
      t.fail('THE BUILDING IS ON FIRE')
    } else {
      t.pass('this is ok')
      t.pass('i am ok with how things are proceeding')
    }
    if (++n === 50) {
      return clearInterval(i)
    }
  }, 100)
})

t.test('wondermark', function (t) {
  t.plan(500)
  var n = 0
  var j = setInterval(function () {
    if (n % 123 === 35) {
      t.fail('I AM EATING BREAKFAST')
      t.fail('FUCKING SEALIONS')
    } else {
      t.pass('excuse me')
      t.pass('pardon me')
    }
    if (++n === 250) {
      return clearInterval(j)
    }
  }, 10)
})