Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Open handles with Jest configuration #168

Open
4rokis opened this issue Jun 24, 2021 · 4 comments
Open

Open handles with Jest configuration #168

4rokis opened this issue Jun 24, 2021 · 4 comments

Comments

@4rokis
Copy link

4rokis commented Jun 24, 2021

I am trying to set up a typescript with jest configuration. However, as soon as i have switched to jest i am getting this error. My understanding is that i should clean something up. Do you have any idea what? Happens on pure JS as well.

Repository
https://github.com/S4n60w3n/cryptolette

Jest has detected the following 2 open handles potentially keeping Jest from exiting:

  ●  PROCESSWRAP

    > 1 | import { accounts, contract } from '@openzeppelin/test-environment';
        | ^
      2 | import { BN } from '@openzeppelin/test-helpers'
      3 |
      4 | const MyContract = contract.fromArtifact('Cryptolette');

      at Object.default_1 [as default] (node_modules/@openzeppelin/test-environment/src/setup-ganache.ts:35:20)
      at node_modules/@openzeppelin/test-environment/src/test-provider.ts:21:37
      at run (node_modules/p-queue/dist/index.js:157:104)
      at PQueue._tryToStartAnother (node_modules/p-queue/dist/index.js:105:17)
      at node_modules/p-queue/dist/index.js:171:18
      at PQueue.add (node_modules/p-queue/dist/index.js:152:16)
      at new TestProvider (node_modules/@openzeppelin/test-environment/src/test-provider.ts:19:16)
      at Object.<anonymous> (node_modules/@openzeppelin/test-environment/src/setup-provider.ts:6:18)
      at Object.<anonymous> (node_modules/@openzeppelin/test-environment/src/helpers.ts:6:1)
      at Object.<anonymous> (node_modules/@openzeppelin/test-environment/src/index.ts:1:1)
      at Object.<anonymous> (test/cryptolette.test.ts:1:1)
      at TestScheduler.scheduleTests (node_modules/@jest/core/build/TestScheduler.js:333:13)
      at runJest (node_modules/@jest/core/build/runJest.js:387:19)
      at _run10000 (node_modules/@jest/core/build/cli/index.js:408:7)
      at runCLI (node_modules/@jest/core/build/cli/index.js:261:3)


  ●  PIPEWRAP

    > 1 | import { accounts, contract } from '@openzeppelin/test-environment';
        | ^
      2 | import { BN } from '@openzeppelin/test-helpers'
      3 |
      4 | const MyContract = contract.fromArtifact('Cryptolette');

          at Array.reduce (<anonymous>)
      at Object.default_1 [as default] (node_modules/@openzeppelin/test-environment/src/setup-ganache.ts:35:20)
      at node_modules/@openzeppelin/test-environment/src/test-provider.ts:21:37
      at run (node_modules/p-queue/dist/index.js:157:104)
      at PQueue._tryToStartAnother (node_modules/p-queue/dist/index.js:105:17)
      at node_modules/p-queue/dist/index.js:171:18
      at PQueue.add (node_modules/p-queue/dist/index.js:152:16)
      at new TestProvider (node_modules/@openzeppelin/test-environment/src/test-provider.ts:19:16)
      at Object.<anonymous> (node_modules/@openzeppelin/test-environment/src/setup-provider.ts:6:18)
      at Object.<anonymous> (node_modules/@openzeppelin/test-environment/src/helpers.ts:6:1)
      at Object.<anonymous> (node_modules/@openzeppelin/test-environment/src/index.ts:1:1)
      at Object.<anonymous> (test/cryptolette.test.ts:1:1)
      at TestScheduler.scheduleTests (node_modules/@jest/core/build/TestScheduler.js:333:13)
      at runJest (node_modules/@jest/core/build/runJest.js:387:19)
      at _run10000 (node_modules/@jest/core/build/cli/index.js:408:7)
      at runCLI (node_modules/@jest/core/build/cli/index.js:261:3)
@FrozenKiwi
Copy link

I'm having the same issue. For local tests it is a superficial issue but in CI (GitHub Actions) it appears to be blocking my tests from completing.

There is something here to disconnect the server:

process.on('disconnect', () => {
I just can't figure out how to trigger it

@FrozenKiwi
Copy link

For CI, I added --forceExit to make sure the tests complete.

@Nilotaviano
Copy link

I'm having the same issue

@yujonglee
Copy link

I'm having the same issue. Anyone has a solution?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants