Skip to content

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

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

Activity

  1. ejfrancis commented on Mar 31, 2017

    @ejfrancis

    +1 , I need cobertura but don't want to eject from CRA

  2. added this to the milestone on May 16, 2017
  3. gaearon commented on May 16, 2017

    @gaearon
    Contributor

    Fixed by #1830.

  4. gaearon commented on May 16, 2017

    @gaearon
    Contributor

    Please help beta test the new version that includes this change!
    #2172

  5. locked and limited conversation to collaborators on Jan 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions