Open OoDeLally opened 3 years ago
Just hit this. Any thoughts? It seems not so great that this doesn't work.
As part of my other bug report I went ahead and added a reproduction for this bug as well since they might be related? https://github.com/cowboyd/jest-suite-hooks-on-sigint
@OoDeLally It should also be noted that the same holds true for the exit
event.
Any thoughts on how we can contribute to the resolution of this?
Are there any work arounds?
@eladchen I have not been able to find any 😢
This is still the case in 27.5.1, it really shouldn't be.
Strong agree. Hopefully with Facebook setting this project free this will get some attention.
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.
👍🏻
Just faced this with pino transport which runs in a worker thread and listens to the 'beforeExit' event:
Jest has detected the following 1 open handle potentially keeping Jest from exiting
I just ran into this. We use this handler to ensure that certain child processes spawned by a service is killed when the program exits, but it doesn't work under jest.
🐛 Bug Report
beforeExit
event is never called.We are using this event to release resources of a Rust library upon object's garbage collection, using https://github.com/node-ffi-napi/weak-napi.
To Reproduce
Expected behavior
We should see
beforeExit
logged.The same test works fine with Mocha, where
beforeExit
is successfully called.envinfo