Skip to content

Jest tests detect open handles for Node v20 (TTYWRAP) #2

@nktnet1

Description

@nktnet1

For any Jest tests that uses

import esm from '@httptoolkit/esm';

e.g. running any tests in import-sync, the following error occurs in Node v20 (but not v18).

Jest has detected the following 1 open handle potentially keeping Jest from exiting:

  ●  TTYWRAP

    > 1 | import esm from '@httptoolkit/esm';
        | ^
      2 |
      3 | import { Options } from './options';
      4 | import { findModuleFile, getCallerDirname } from './files';

      at Object.<anonymous> (node_modules/@httptoolkit/esm/esm.js:1:43442)
      at r (node_modules/@httptoolkit/esm/esm.js:1:603)
      at node_modules/@httptoolkit/esm/esm.js:1:795
      at node_modules/@httptoolkit/esm/esm.js:1:806
      at j (node_modules/@httptoolkit/esm/esm.js:1:1034)
      at Object.<anonymous> (node_modules/@httptoolkit/esm/esm.js:1:1692)
      at Object.<anonymous> (src/import.ts:1:1)
      at Object.<anonymous> (src/index.ts:1:1)
      at Object.<anonymous> (tests/resolver/resolver.test.ts:1:1)

@pimterry not sure if you have any idea?

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