Skip to content

Disable watch in npm test -- --coverage #1207

Closed

Description

@gaearon

See discussion in jestjs/jest#2256.
We need to decide how to handle this and fix it.

Activity

  1. added this to the 0.9.0 milestone on Dec 8, 2016
  2. BenoitAverty commented on Dec 9, 2016

    @BenoitAverty
    Contributor

    My opinion on this is that the coverage information is usually not needed at the same time as when the watch mode is most useful.

    Most of the time, I use watch mode while writing tests or doing tdd, which allow me to go faster than if I had to run the tests all the time. In this case, I usually don't care about test coverage.

    On the other hand, right before commiting, I find the coverage info very useful because it allows me to see if I forgot a test or if something I thought I tested is, in fact, not properly done. When I notice that, I often fix it without watch mode.

    I don't know if there are a lot of people in my case, but for me the simplest and best option is to simply disable watch mode when the --coverage flag is specified

  3. gaearon commented on Dec 9, 2016

    @gaearon
    ContributorAuthor

    the simplest and best option is to simply disable watch mode when the --coverage flag is specified

    Agree. 👍
    Want to make a PR?

  4. BenoitAverty commented on Dec 10, 2016

    @BenoitAverty
    Contributor

    Yeah I'll open on now. Thanks !

  5. gaearon commented on Dec 11, 2016

    @gaearon
    ContributorAuthor

    Should be fixed in react-scripts@0.8.4. Please verify.
    https://github.com/facebookincubator/create-react-app/releases/tag/v0.8.4

  6. locked and limited conversation to collaborators on Jan 22, 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