Skip to content

[Bug]: Typescript compilation errors cause Jest to hang silently #12832

@niekvandepas

Description

@niekvandepas

Version

28.1.0

Steps to reproduce

  1. Close repo at https://github.com/NiekPas/jest-hangs.git
  2. Run npm i
  3. Run npm run test

Expected behavior

I expect Jest to output a compilation error or other indication that the test could not be run.

Actual behavior

Jest hangs indefinitely.

Additional context

I'm not sure if this is a jest bug or a ts-jest bug. Please let me know if I should move this issue and I will happily do so.

May be due to the use of ESM?

ts-jest version is 28.0.1.

Environment

System:
    OS: macOS 12.2.1
    CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
  Binaries:
    Node: 14.19.1 - ~/.nvm/versions/node/v14.19.1/bin/node
    npm: 6.14.16 - ~/.nvm/versions/node/v14.19.1/bin/npm
  npmPackages:
    jest: ^28.0.3 => 28.1.0

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