Skip to content

Having trouble running Jest, unhandled Promises #1015

@ncrmro

Description

@ncrmro

Awesome project!

Have a database class that has public connect and close methods. Which Jest uses before and afterAll to cleanly connect and disconnect during tests.

Looks like Objection might still be running. Screen shot of code below. Any ideas on how to close this. Log shows

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

  ●  PROMISE

          at Function.resolve (<anonymous>)
      at Object.<anonymous> (node_modules/lodash/_getTag.js:37:32)
      at Object.<anonymous> (node_modules/lodash/_baseIsEqualDeep.js:5:14)


  ●  PROMISE

      at Object.getNativePromise (node_modules/bluebird/js/release/util.js:324:27)
      at Object.<anonymous> (node_modules/bluebird/js/release/schedule.js:7:26)
      at Object.<anonymous> (node_modules/bluebird/js/release/async.js:4:16)


  ●  PROMISE

          at Function.resolve (<anonymous>)
      at Object.<anonymous> (node_modules/objection/lib/utils/clone.js:1569:32)
      at Object.<anonymous> (node_modules/objection/lib/utils/clone.js:2303:3)
      at Object.<anonymous> (node_modules/objection/lib/utils/objectUtils.js:1:57)

dbjest

Code base can be found here

Thanks again for the awesome tool

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