Skip to content

When running jest script through npm, the snapshot summary help message is missing -- #5414

@yjcxy12

Description

@yjcxy12

Do you want to request a feature or report a bug?
Report a bug

What is the current behavior?
When running jest through npm script, the Snapshot Summary report outputs wrong help message. e.g. run `npm run test:react -u` to remove it. rather than run `npm run test:react -- -u` to remove it.

If the current behavior is a bug, please provide the steps to reproduce and
either a repl.it demo through https://repl.it/languages/jest or a minimal
repository on GitHub that we can yarn install and yarn test.

  • make a snapshot
  • run test
  • remove original component
  • run test again

What is the expected behavior?
It should output run `npm run test:react -- -u

Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.

Using npm@5 node@8 Macbook OSX

Additional info
Suspect https://github.com/facebook/jest/blob/master/packages/jest-cli/src/reporters/summary_reporter.js#L147 is the line to fix. Only checking isYarn.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions