Skip to content

Jest not exiting on failure with notify true #3177

@th3fallen

Description

@th3fallen

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

What is the current behavior? Tests do not exit on failure with notify set to true

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.

can be reproduced in any test setup, if you dont already have notify true just run a failing test with jest {pathtotest} --notify and observe on failure the process does not exit

What is the expected behavior? test should exit regardless of notify flag

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

Config

"jest": {
    "modulePaths": [
      "app"
    ],
    "coverageThreshold": {
      "global": {
        "statements": 85,
        "branches": 70,
        "functions": 80,
        "lines": 85
      }
    },
    "coverageDirectory": "<rootDir>/reports/coverage",
    "collectCoverageFrom": [
      "app/**/*.js",
      "!app/tests/**",
      "!app/shared/vendor/**",
      "!app/main.js"
    ],
    "notify": true,
    "coverageReporters": [
      "lcov",
      "text-summary"
    ],
    "setupFiles": [
      "<rootDir>/scripts/testSetup.js"
    ],
    "snapshotSerializers": [
      "enzyme-to-json/serializer"
    ],
    "moduleNameMapper": {
      "^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
      "^.+\\.(css|scss)$": "<rootDir>/__mocks__/styleMock.js"
    }
  },

Enviro Information

OS: OSX 10.12.4 beta
Node: 6.10.0
NPM: 4.4.2
Yarn: 0.21.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions