Skip to content

Error when nodegit is referenced from several places #3550

@stukalin

Description

@stukalin

If nodegit is referenced in more than 1 test file (even not directly) then Jest throws random errors related to promisify-node like:
TypeError: Cannot convert undefined or null to object at processExports (node_modules/promisify-node/index.js:44:16) at Object.<anonymous> (index.js:1:106) at Object.<anonymous> (__tests__/index.test.js:1:100)
Steps could be following:

  1. install jest and nodegit; create a module which requires nodegit and 2 tests which require the module
  2. run jest

I've created a repo illustrating that.
https://github.com/stukalin/jest-nodegit-issue
Simply run yarn install && yarn test. Note, that sometimes tests pass, but simply repeat 2-3 times.

With --no-cache it works

My conf:
OS: Ubuntu 16.04
Jest: v20.0.1
nodegit: latest (0.18.3)
yarn: 0.23.4
npm: 3.10.10
node: v6.10.2

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