-
-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle unfinished promise-awaiting tests
- Loading branch information
Showing
4 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
TAP version 13 | ||
# Subtest: parent | ||
# Subtest: child | ||
# Subtest: grandchild | ||
1..2 | ||
ok 1 - ok | ||
not ok 2 - test unfinished: grandchild | ||
--- | ||
{"at":{"column":14,"file":"test/test/unfinished-promise.js","line":4},"count":1,"plan":2,"source":"return t.test('grandchild', function (t) {\n"} | ||
... | ||
Bail out! # test unfinished: grandchild | ||
Bail out! # test unfinished: grandchild | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
var t = require('../..') | ||
t.test('parent', function (t) { | ||
return t.test('child', function (t) { | ||
return t.test('grandchild', function (t) { | ||
t.plan(2) | ||
t.pass('ok') | ||
}) | ||
}) | ||
}) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
TAP version 13 | ||
# Subtest: parent | ||
# Subtest: child | ||
# Subtest: grandchild | ||
1..2 | ||
ok 1 - ok | ||
not ok 2 - test unfinished: grandchild | ||
--- | ||
{"at":{"column":14,"file":"test/test/unfinished-promise.js","line":4},"count":1,"plan":2,"source":"return t.test('grandchild', function (t) {\n"} | ||
... | ||
# failed 1 of 2 tests | ||
not ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~ | ||
--- | ||
{"at":{"column":14,"file":"test/test/unfinished-promise.js","line":4},"results":{"count":2,"fail":1,"ok":false,"pass":1,"plan":{"end":2,"start":1}},"source":"return t.test('grandchild', function (t) {\n"} | ||
... | ||
|
||
1..1 | ||
# failed 1 of 1 tests | ||
not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~ | ||
--- | ||
{"at":{"column":12,"file":"test/test/unfinished-promise.js","line":3},"results":{"count":1,"fail":1,"ok":false,"pass":0,"plan":{"end":1,"start":1}},"source":"return t.test('child', function (t) {\n"} | ||
... | ||
|
||
1..1 | ||
# failed 1 of 1 tests | ||
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~ | ||
--- | ||
{"at":{"column":3,"file":"test/test/unfinished-promise.js","line":2},"results":{"count":1,"fail":1,"ok":false,"pass":0,"plan":{"end":1,"start":1}},"source":"t.test('parent', function (t) {\n"} | ||
... | ||
|
||
1..1 | ||
# failed 1 of 1 tests | ||
___/# time=[0-9.]+(ms)?/~~~ | ||
|