jest-coverage-report-action icon indicating copy to clipboard operation
jest-coverage-report-action copied to clipboard

Fallback to coverage-final.json

Open Crafoord opened this issue 2 years ago • 1 comments

Idea

When using vitest instead of jest for running the tests I can't manage to get the json report to include the coverageMap property. But I can tell my coverage-reporter to generate a ['json'] file. From what I can tell this json file (outputs as coverage-final.json) contains the exact same data as the coverageMap does.

So... Could a fallback be to check for this file when coverageMap property does not exist (instead of it crashing with a null/undefined error).

Additional context

coverageMap missing from the json report causes this action to crash.

This "error" is discussed here: https://github.com/ArtiomTr/jest-coverage-report-action/issues/244

Crafoord avatar Sep 27 '22 13:09 Crafoord

Described workaround in mentioned issue

https://github.com/ArtiomTr/jest-coverage-report-action/issues/244#issuecomment-1260555231

nowyDEV avatar Sep 28 '22 08:09 nowyDEV