Skip to content

allow setting of coverage reporters (or other jest config options)ย #1785

Closed
@onelson

Description

@onelson

Normally, when using jest for testing in CI, we configure cobertura (so it can be parsed/visualized).
Usually we do this in our package.json

{
...
  "jest": {
    "coverageReporters": [
      "text",
      "cobertura"
    ]
  }
...
}

but this seems to be ignored when working with RCA.

I looked at perhaps using using react-scripts test -- --coverage --config ... to specify a config file for jest, but this yields a weird error:

> react-scripts test --env=jsdom --coverage --config=./jest/ci-conf.json

Error: Unknown config option "0" with value "./jest/ci-conf.json". This is either a typing error or a user mistake and fixing it will remove this message.

Specifying a config for jest is the worst case scenario, however, since it would require knowledge of what RCA normally provides. It would be much nicer to be able to override this in package.json

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions