test-summary / action

Show a helpful summary of test results in GitHub Actions CI/CD workflow runs
MIT License
395 stars 32 forks source link

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

Open nikeee opened 1 year ago

nikeee commented 1 year ago

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.

marijn commented 1 year ago

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'
 ...
nikeee commented 1 year ago

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