[Pkg-javascript-commits] [node-tap] 58/186: use full test name in snapshot output
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 1 16:40:43 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-tap.
commit 28e1870b72898869fc2d6e4266e46be1531dfdaa
Author: isaacs <i at izs.me>
Date: Tue Oct 31 23:33:01 2017 -0700
use full test name in snapshot output
The better to debug snapshot files with
---
lib/test.js | 5 +++--
tap-snapshots/unit-test.js-TAP.js | 22 +++++++++++-----------
2 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/lib/test.js b/lib/test.js
index 785cfe9..88b5f19 100644
--- a/lib/test.js
+++ b/lib/test.js
@@ -969,10 +969,11 @@ class Test extends Base {
extra = {}
// use notOk because snap doesn't return a truthy value
+ const m = this.fullname + ' > ' + message
return this.writeSnapshot
- ? this.notOk(this[_snapshot].snap(found, message),
+ ? this.notOk(this[_snapshot].snap(found, m),
message, extra)
- : this.equal(found, this[_snapshot].read(message),
+ : this.equal(found, this[_snapshot].read(m),
message, extra)
}
diff --git a/tap-snapshots/unit-test.js-TAP.js b/tap-snapshots/unit-test.js-TAP.js
index cc720cb..824b85f 100644
--- a/tap-snapshots/unit-test.js-TAP.js
+++ b/tap-snapshots/unit-test.js-TAP.js
@@ -1,25 +1,25 @@
'use strict'
-exports[`no plan_0`] = `TAP version 13
+exports[`unit/test.js TAP short output checks no plan > no plan_0`] = `TAP version 13
ok 1 - this is fine
1..1
`
-exports[`plan_0`] = `TAP version 13
+exports[`unit/test.js TAP short output checks plan > plan_0`] = `TAP version 13
1..1
ok 1 - this is fine
`
-exports[`comment_0`] = `TAP version 13
+exports[`unit/test.js TAP short output checks comment > comment_0`] = `TAP version 13
# this is fine
1..0
`
-exports[`pragma_0`] = `TAP version 13
+exports[`unit/test.js TAP short output checks pragma > pragma_0`] = `TAP version 13
pragma +strict
1..0
`
-exports[`todo_0`] = `TAP version 13
+exports[`unit/test.js TAP short output checks todo > todo_0`] = `TAP version 13
not ok 1 - i will do this later # TODO
---
at:
@@ -39,7 +39,7 @@ ok 4 - i did not do this later # SKIP
# skip: 2
`
-exports[`only_0`] = `TAP version 13
+exports[`unit/test.js TAP short output checks only > only_0`] = `TAP version 13
# "run this with a comment" has \`only\` set but all tests run
# Subtest: run this with a comment
1..0
@@ -57,24 +57,24 @@ ok 3 - run this with a comment # {time}
1..3
`
-exports[`no plan fail_0`] = `TAP version 13
+exports[`unit/test.js TAP short output checks no plan fail > no plan fail_0`] = `TAP version 13
not ok 1 - this is fine
1..1
# failed 1 test
`
-exports[`plan fail_0`] = `TAP version 13
+exports[`unit/test.js TAP short output checks plan fail > plan fail_0`] = `TAP version 13
1..1
not ok 1 - this is fine
# failed 1 test
`
-exports[`expect fail_0`] = `TAP version 13
+exports[`unit/test.js TAP short output checks expect fail > expect fail_0`] = `TAP version 13
1..1
ok 1 - this is fine
`
-exports[`sub_0`] = `TAP version 13
+exports[`unit/test.js TAP short output checks sub > sub_0`] = `TAP version 13
# Subtest: named child
ok 1 - this is fine
1..1
@@ -93,7 +93,7 @@ ok 3 - promisey # {time}
1..3
`
-exports[`parallel sub_0`] = `TAP version 13
+exports[`unit/test.js TAP short output checks parallel sub > parallel sub_0`] = `TAP version 13
1..2
ok 1 - slow child # {time} {
1..0
--
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