Skip to content

Upgrade to TAP 14 - support for subtests, maybe indentation? #588

@tristanhoy

Description

@tristanhoy

TAP 14 spec allows for identifying a test as a "subtest"

 TAP version 14
 1..2

 # Subtest: foo.tap
     1..2
     ok 1
     ok 2 - this passed
 ok 1 - foo.tap

 # Subtest: bar.tap
     ok 1 - object should be a Bar
     not ok 2 - object.isBar should return true
       ---
       found: false
       wanted: true
       at:
         file: test/bar.ts
         line: 43
         column: 8
       ...
     ok 3 - object can bar bears # TODO
     1..3
 not ok 2 - bar.tap
   ---
   fail: 1
   todo: 1
   ...

Is migrating to TAP 14 on the roadmap?

This would allow beautifiers to correctly indent subtests as TAP 13 has no mechanism for indicating the "level" of a test (everything is just flat comments).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions