Skip to content

Jest detects open handle in bitwarden node sdk #1275

@FrozenKiwi

Description

@FrozenKiwi

Steps To Reproduce

This is probably pbkac, but I have the following warning:

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

  ●  CustomGC

      at Runtime._loadModule (../../node_modules/jest-runtime/build/index.js:1018:29)
      at Object.<anonymous> (../../node_modules/@bitwarden/sdk-napi/binding.js:178:31)
      at Object.<anonymous> (../../node_modules/@bitwarden/sdk-napi/dist/bitwarden_client/index.js:36:27)
      at Object.<anonymous> (../../node_modules/@bitwarden/sdk-napi/dist/index.js:17:14)

Does Bitwarden require an explicit release? I cache the client in globalThis, could that be a factor here?

Expected Result

I would like my jest tests to exit cleanly (although it's not a big deal)

Actual Result

warning appears when --detectOpenHandles is used

Screenshots or Videos

No response

Additional Context

No response

Operating System

Linux

Operating System Version

Ubuntu 24

Build Version

1.0.0

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions