action icon indicating copy to clipboard operation
action copied to clipboard

`Error: unknown TAP line X: ' 1..5'`

Open nikeee opened this issue 2 years ago • 2 comments

I'm using https://github.com/vitest-dev/vitest/pull/445 to generate TAP results.

This is an excerpt from the TAP output:

TAP version 13
1..2
ok 1 - src/redacted.test.ts # time=11.00ms {
    1..5
    ok 1 - redacted # time=1.00ms
    ok 2 - redacted # time=1.00ms
    ok 3 - redacted # time=2.00ms
    ok 4 - redacted # time=1.00ms
    ok 5 - redacted # time=0.00ms
}

I get this error.

`Error: unknown TAP line X: '    1..5'`

It seems like this action is having trouble with the way the library is emitting subtests. Looking at the spec of TAP, sub tests are not even part of TAPv13. It is part of TAPv14, but with a different syntax.

nikeee avatar Oct 02 '23 15:10 nikeee

Having the same issue. Sample TAP output from my suite:

TAP version 13
1..1
# FIXTURE GitHubActionsSpec
not ok 1 GitHubActionsSpec > it_reports_failing_tests
 ---
 message: Expected true to be false.
 severity: fail
 data:
   got: 'true'
   expect: 'false'
 ...

marijn avatar Oct 27 '23 19:10 marijn

I ended up writing my own action that uses a popular parser: https://github.com/nikeee/tap-summary

nikeee avatar Oct 29 '23 16:10 nikeee