You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'use strict'consttest=require('tape')test('test #1',t=>{t.plan(2)t.ok(true,'get #1 first result')setTimeout(()=>{t.ok(true,'get #1 second result')},500)})test('test #2 - should fail on plan',t=>{t.plan(3)t.ok(true,'get #2 first result')setTimeout(()=>{t.ok(true,'get #2 second result')},500)})test.createStream().on('data',line=>{console.log(line.trim())}).on('close',()=>{const{count, fail, pass}=test.getHarness()._resultsconsole.log({count, fail, pass})})
Node output:
TAP version 13
# test #1
TAP version 13
# test #1
ok 1 get #1 first result
ok 1 get #1 first result
# test #2 - should fail on plan
# test #2 - should fail on plan
ok 2 get #2 first result
ok 2 get #2 first result
ok 3 get #1 second result
ok 3 get #1 second result
ok 4 get #2 second result
ok 4 get #2 second result
not ok 5 plan != count
---
operator: fail
expected: 3
actual: 2
...
not ok 5 plan != count
---
operator: fail
expected: 3
actual: 2
...
1..5
1..5
# tests 5
# tests 5
# pass 4
# pass 4
# fail 1
# fail 1
{ count: 5, fail: 1, pass: 4 }
Browserified console output:
TAP version 13
# test #1
TAP version 13
# test #1
ok 1 get #1 first result
ok 1 get #1 first result
# test #2 - should fail on plan
# test #2 - should fail on plan
ok 2 get #2 first result
ok 2 get #2 first result
ok 3 get #1 second result
ok 3 get #1 second result
ok 4 get #2 second result
ok 4 get #2 second result
1..4
1..4
# tests 4
# tests 4
# pass 4
# pass 4
# ok
# ok
Object { count: 4, fail: 0, pass: 4 }
The text was updated successfully, but these errors were encountered:
Test code:
Node output:
Browserified console output:
The text was updated successfully, but these errors were encountered: