[Pkg-javascript-commits] [node-tap] 07/19: New upstream version 8.0.0
Jérémy Lal
kapouer at moszumanska.debian.org
Sat Nov 12 01:03:56 UTC 2016
This is an automated email from the git hooks/post-receive script.
kapouer pushed a commit to branch master
in repository node-tap.
commit d3feedcfec0eff76d8e8de3715d6f0518ec0152f
Author: Jérémy Lal <kapouer at melix.org>
Date: Fri Nov 11 12:35:14 2016 +0100
New upstream version 8.0.0
---
lib/test.js | 11 ++++++++++-
package.json | 13 ++++++-------
test/test.js | 8 ++++++--
test/test/plan-too-many.tap | 6 ++++++
test/test/throws-and-plans.tap | 6 ++++++
test/test/unfinished-promise-bail.tap | 13 +++++++++++++
test/test/unfinished-promise.js | 9 +++++++++
test/test/unfinished-promise.tap | 34 ++++++++++++++++++++++++++++++++++
8 files changed, 90 insertions(+), 10 deletions(-)
diff --git a/lib/test.js b/lib/test.js
index aec3cee..8aa2986 100644
--- a/lib/test.js
+++ b/lib/test.js
@@ -260,6 +260,7 @@ Test.prototype.endAll = function () {
child._bailedOut = true
}
+ this._mustDeferEnd = false
this.end(IMPLICIT)
}
@@ -1050,8 +1051,16 @@ Test.prototype._end = function (implicit) {
// guard against that with the 'ending' flag
this._ending = true
var missing = this._plan - this._count
+ var addMissingTestDiag = true
while (missing > 0) {
- this.fail('missing test', { at: false })
+ this.fail('missing test', {
+ at: false,
+ plan: this._plan,
+ count: this._count,
+ missing: missing,
+ diagnostic: addMissingTestDiag
+ })
+ addMissingTestDiag = false
missing--
}
diff --git a/package.json b/package.json
index 518d19a..0a3724a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "tap",
- "version": "7.1.2",
+ "version": "8.0.0",
"author": "Isaac Z. Schlueter <i at izs.me> (http://blog.izs.me)",
"description": "A Test-Anything-Protocol library",
"homepage": "http://node-tap.org/",
@@ -30,7 +30,7 @@
"stack-utils": "^0.4.0",
"tap-mocha-reporter": "^2.0.0",
"tap-parser": "^2.2.0",
- "tmatch": "^2.0.1"
+ "tmatch": "^3.0.0"
},
"keywords": [
"assert",
@@ -52,16 +52,15 @@
"which": "^1.1.1"
},
"files": [
+ "bin/mochatap.js",
+ "bin/run.js",
+ "bin/usage.txt",
"lib/assert.js",
"lib/mocha.js",
"lib/root.js",
"lib/stack.js",
"lib/synonyms.js",
- "lib/test.js",
- "bin/mochatap.js",
- "bin/run.js",
- "bin/usage.txt",
- "bin/is-exe.js"
+ "lib/test.js"
],
"config": {
"nyc": {
diff --git a/test/test.js b/test/test.js
index c379a91..e670dd6 100644
--- a/test/test.js
+++ b/test/test.js
@@ -33,8 +33,12 @@ function runTests (file) {
}
}
- if (file.match(/\bsigterm\b/) && process.version.match(/^v0\.10\./)) {
- skip = 'sigterm handling test does not work on 0.10'
+ if (file.match(/\bsigterm\b/)) {
+ if (process.version.match(/^v0\.10\./)) {
+ skip = 'sigterm handling test does not work on 0.10'
+ } else if (process.platform === 'win32') {
+ skip = 'sigterm handling is weird on windows'
+ }
}
var f = file.substr(dir.length)
diff --git a/test/test/plan-too-many.tap b/test/test/plan-too-many.tap
index 9656426..dbab957 100644
--- a/test/test/plan-too-many.tap
+++ b/test/test/plan-too-many.tap
@@ -11,6 +11,9 @@ TAP version 13
{"at":{"column":5,"file":"test/test/plan-too-many.js","line":7},"count":1,"plan":8,"source":"t.test('grandchild', function (tt) {\n"}
...
not ok 3 - missing test
+ ---
+ {"count":2,"missing":6,"plan":8}
+ ...
not ok 4 - missing test
not ok 5 - missing test
not ok 6 - missing test
@@ -23,6 +26,9 @@ TAP version 13
...
not ok 4 - missing test
+ ---
+ {"count":3,"missing":6,"plan":9}
+ ...
not ok 5 - missing test
not ok 6 - missing test
not ok 7 - missing test
diff --git a/test/test/throws-and-plans.tap b/test/test/throws-and-plans.tap
index 99bc19f..3785652 100644
--- a/test/test/throws-and-plans.tap
+++ b/test/test/throws-and-plans.tap
@@ -48,6 +48,9 @@ not ok 3 - no assert only throw ___/# time=[0-9.]+(ms)?/~~~
{"at":{"column":11,"file":"test/test/throws-and-plans.js","line":39},"message":"Error: pwnSync","source":"throw new Error('pwnSync')\n","test":"sync thrower"}
...
not ok 3 - missing test
+ ---
+ {"count":2,"missing":6,"plan":8}
+ ...
not ok 4 - missing test
not ok 5 - missing test
not ok 6 - missing test
@@ -68,6 +71,9 @@ not ok 3 - no assert only throw ___/# time=[0-9.]+(ms)?/~~~
{"at":{"column":13,"file":"test/test/throws-and-plans.js","line":18},"message":"Error: pwn","source":"throw new Error('pwn')\n","test":"async thrower"}
...
not ok 4 - missing test
+ ---
+ {"count":3,"missing":5,"plan":8}
+ ...
not ok 5 - missing test
not ok 6 - missing test
not ok 7 - missing test
diff --git a/test/test/unfinished-promise-bail.tap b/test/test/unfinished-promise-bail.tap
new file mode 100644
index 0000000..87e3050
--- /dev/null
+++ b/test/test/unfinished-promise-bail.tap
@@ -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
+
diff --git a/test/test/unfinished-promise.js b/test/test/unfinished-promise.js
new file mode 100644
index 0000000..e4c6765
--- /dev/null
+++ b/test/test/unfinished-promise.js
@@ -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')
+ })
+ })
+})
diff --git a/test/test/unfinished-promise.tap b/test/test/unfinished-promise.tap
new file mode 100644
index 0000000..6117019
--- /dev/null
+++ b/test/test/unfinished-promise.tap
@@ -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)?/~~~
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-tap.git
More information about the Pkg-javascript-commits
mailing list