Skip to content

[BUG] npm run [command] -- [--arg] does not pass the arg #2350

@Admiralfeb

Description

@Admiralfeb

Current Behavior:

Attempting to run this command against create-react-app npm run test -- --coverage --watchAll=false
When npm registers and begins the execution, it states that it is running react-scripts test with neither flag

Expected Behavior:

I should be getting react-scripts test "--coverage" "--watchAll=false"

Steps To Reproduce:

  1. npx create-react-app test
  2. cd to new project
  3. run npm run test -- --coverage --watchAll=false
  4. coverage and watchAll=false should both be passed to the test execution

Environment:

  • OS: Windows 10 19042.608
  • Node: 15.3.0
  • npm: 7.1.2

Note

I can add "test:coverage": "react-scripts test --coverage --watchAll=false" to package.json and it works with no issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next stepsRelease 7.xwork is associated with a specific npm 7 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions