-
-
Save isaacs/1679d0481306120e53d279e61c531dc0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var t = require('tap') | |
if (process.argv[2] === 'child') { | |
t.test('parent', function (t) { | |
return t.test('child', function (t) { | |
return t.test('grandchild', function (t) { | |
t.plan(1) | |
t.fail('this is fine') | |
}) | |
}) | |
}) | |
} else { | |
t.spawn(process.execPath, [__filename, 'child']) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TAP version 13 | |
not ok 1 - ./t.js child { | |
not ok 1 - parent { | |
not ok 1 - child { | |
not ok 1 - grandchild { | |
1..1 | |
not ok 1 - this is fine | |
--- | |
at: | |
line: 7 | |
column: 11 | |
file: t.js | |
type: global | |
stack: | | |
t.js:7:11 | |
t.js:5:16 | |
t.js:4:14 | |
Object.<anonymous> (t.js:3:5) | |
run (bootstrap_node.js:420:7) | |
startup (bootstrap_node.js:139:9) | |
bootstrap_node.js:535:3 | |
source: | | |
t.fail('this is fine') | |
... | |
# failed 1 of 1 tests | |
} | |
1..1 | |
# failed 1 of 1 tests | |
} | |
1..1 | |
# failed 1 of 1 tests | |
} | |
1..1 | |
# failed 1 of 1 tests | |
# time=28.926ms | |
} | |
1..1 | |
# failed 1 of 1 tests | |
# time=224.879ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TAP version 13 | |
# Subtest: ./t.js child | |
# Subtest: parent | |
# Subtest: child | |
# Subtest: grandchild | |
1..1 | |
not ok 1 - this is fine | |
--- | |
at: | |
line: 7 | |
column: 11 | |
file: t.js | |
type: global | |
stack: | | |
t.js:7:11 | |
t.js:5:16 | |
t.js:4:14 | |
Object.<anonymous> (t.js:3:5) | |
run (bootstrap_node.js:420:7) | |
startup (bootstrap_node.js:139:9) | |
bootstrap_node.js:535:3 | |
source: | | |
t.fail('this is fine') | |
... | |
# failed 1 of 1 tests | |
not ok 1 - grandchild # time=11.306ms | |
--- | |
at: | |
line: 5 | |
column: 16 | |
file: t.js | |
type: global | |
results: | |
plan: | |
start: 1 | |
end: 1 | |
count: 1 | |
pass: 0 | |
ok: false | |
fail: 1 | |
time: 11.306 | |
source: | | |
return t.test('grandchild', function (t) { | |
... | |
1..1 | |
# failed 1 of 1 tests | |
not ok 1 - child # time=17.557ms | |
--- | |
at: | |
line: 4 | |
column: 14 | |
file: t.js | |
type: global | |
results: | |
plan: | |
start: 1 | |
end: 1 | |
count: 1 | |
pass: 0 | |
ok: false | |
fail: 1 | |
time: 17.557 | |
source: | | |
return t.test('child', function (t) { | |
... | |
1..1 | |
# failed 1 of 1 tests | |
not ok 1 - parent # time=26.16ms | |
--- | |
at: | |
line: 3 | |
column: 5 | |
file: t.js | |
results: | |
plan: | |
start: 1 | |
end: 1 | |
count: 1 | |
pass: 0 | |
ok: false | |
fail: 1 | |
time: 26.16 | |
source: | | |
t.test('parent', function (t) { | |
... | |
1..1 | |
# failed 1 of 1 tests | |
# time=38.015ms | |
not ok 1 - ./t.js child # time=329.134ms | |
--- | |
at: | |
line: 12 | |
column: 5 | |
file: t.js | |
results: | |
ok: false | |
count: 1 | |
pass: 0 | |
fail: 1 | |
bailout: false | |
todo: 0 | |
skip: 0 | |
plan: | |
start: 1 | |
end: 1 | |
skipAll: false | |
skipReason: '' | |
comment: '' | |
exitCode: 1 | |
command: /usr/local/bin/node | |
arguments: | |
- /Users/isaacs/dev/js/tap/t.js | |
- child | |
source: | | |
t.spawn(process.execPath, [__filename, 'child']) | |
... | |
1..1 | |
# failed 1 of 1 tests | |
# time=345.955ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment