-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
Please do not comment with what you wish subtests would be, but only how they are supported in your actual real-world implementations.
There are three general forms that I see in the discussions of current implementations. (Node-tap interprets all of these, but only generates the "commented" and "buffered" styles.)
Bare Subtest
TAP version 14
1..1
1..1
ok 1
ok 1 - subtest name
Commented Subtest
TAP version 14
1..2
# Subtest: subtest name
1..1
ok 1
ok 1 - subtest name
# can be unnamed, as well:
# Subtest
1..1
ok 1
ok 2
The name doesn't currently have to match, but I've considered adding some strictness around that, like if a name was introduced, then any output at the parent level is considered non-TAP until we get the matching Test Point to end it.
Buffered Subtest
TAP version 14
1..1
ok 1 - subtest name {
1..1
ok 1
}
I have some questions about how to attach diags/directives to buffered subtests. Here's what node-tap does:
TAP version 14
ok 1 - todo subtest # TODO {
1..1
ok 1 - this is how node-tap generates a buffered directive subtest
}
ok 2 - todo subtest two { # TODO
1..1
ok 1 - node-tap supports this, but does not generate it
}
ok 3 - subtest with diags
---
sub: a dub
...
{
1..1
ok 1
}
ok 4 - subtest with diags and directive # TODO
---
sub: a dub
...
{
1..1
ok 1
}
1..4
We can make the spec a lot simpler if we pick a direction.
Metadata
Metadata
Assignees
Labels
No labels