Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ithinkihaveacat opened this issue Aug 21, 2018 · 3 comments
Open

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

ithinkihaveacat opened this issue Aug 21, 2018 · 3 comments

Comments

@ithinkihaveacat
Copy link

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

@scottcorgan
Copy link
Owner

I think this might be related to scottcorgan/tap-dot#14

@ithinkihaveacat
Copy link
Author

It turns out that the # qqqqqq workaround breaks exit status. So, either you get output on test failure, or exit status, but not both:

$ ( echo -e "1..1\nnot ok 1 - aaa" | tap-spec ) || echo FAILED
# outputs "FAILED", but no test output
$ ( echo -e "# dummy\n1..1\nnot ok 1 - aaa" | tap-spec ) || echo FAILED
# no FAILED, but test output

@JumpLink
Copy link

JumpLink commented Jun 18, 2021

Are there efforts to fix that? I Use Github Actions with tab-spec and my tests are not marked as failed due to the bug. Maybe this can be fixed by upgrade tap-out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants