Skip to content

react-scripts test (or Jest) is reporting exit code 0 on test failures #7180

Closed
@thedanchez

Description

@thedanchez

Is this a bug report?

Possibly

Did you try recovering your dependencies?

Yes

Environment

System:
    OS: macOS High Sierra 10.13.6
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  Binaries:
    Node: 8.12.0 - ~/.nvm/versions/node/v8.12.0/bin/node
    Yarn: 1.10.1 - /usr/local/bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v8.12.0/bin/npm
  Browsers:
    Chrome: 75.0.3770.80
    Firefox: 66.0.2
    Safari: 12.1
  npmPackages:
    react: ^16.6.3 => 16.6.3
    react-dom: ^16.6.3 => 16.6.3
    react-scripts: 2.1.8 => 2.1.8
  npmGlobalPackages:
    create-react-app: Not Found

Steps to Reproduce

  1. Create a CRA project with tests
  2. Create a bash script that encapsulates the react-scripts test command execution
  3. Output the exit code result from within that wrapping bash script

Expected Behavior

I expect the exit code to be non-zero when tests fail

Actual Behavior

react-scripts test is reporting a 0 exit code

Reproducible Demo

None yet

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions