Skip to content

CLI: (some?) test failures not reported #63

@ithinkihaveacat

Description

@ithinkihaveacat

The tap-spec CLI fails to report some errors:

$ cat foo # from https://testanything.org/tap-specification.html
1..4
ok 1 - Input file opened
not ok 2 - First line of the input valid
ok 3 - Read the rest of the file
not ok 4 - Summarized correctly # TODO Not written yet

$ node_modules/.bin/tap-spec < foo
    ✔ Input file opened
    ✔ Read the rest of the file

(I would expect the output to mention the "not ok" tests.)

Including a comment at the start of the TAP input seems to "fix" things:

$ cat bar
# qqqqqq
1..4
ok 1 - Input file opened
not ok 2 - First line of the input valid
ok 3 - Read the rest of the file
not ok 4 - Summarized correctly # TODO Not written yet

$ node_modules/.bin/tap-spec < bar

  qqqqqq

    ✔ Input file opened
    ✔ Read the rest of the file



  Failed Tests: There were 2 failures
[...]

Version: 5.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions