Skip to content

Unable to run unit tests on MacOS 15.6.1 #1209

@pRatikSathaye

Description

@pRatikSathaye

I am using following versions of deps for my project

  1. bcrypt: 6.0.0
  2. Node: 20.19.1
  3. npm: 10.8.2

I am trying to run a unit test as follows

    it('returns true if password and hash match', async () => {
      const password = uuid();
      const passwordHash = await hash(password);

      expect(await compare(password, passwordHash)).to.be.equal(true);
    });

The test fails with following error

     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/<path-to-repo>/test/new-unit/common/bcrypt.test.js)
      at listOnTimeout (node:internal/timers:581:17)
      at process.processTimers (node:internal/timers:519:7)

What I found is that the node_modules/bcrypt does not contains the compatible version of bcrypt.node for MacOS 15.6.1. Unfortunately I do not have MacOS 16 version so I was unable to test this.

Note: When I tried updating timeout to 5s, the test runs successully

Can someone help?

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