You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I ran into Jest hanging for me due to the import-time construction of the socket. I would suggest removing the default socket functionality from this software & requiring the user initialize & manage the lifecycle of their own objects.
In the meanwhile, I've worked around this in two ways. I've changed my import to be conditional:
const transport =
process.ppid === 1
? require("@app/utils/systemd-log-transport").default()
: pino.destination(process.stdout.fd);
and I've added a jest globalTeardown script to trigger the closing of this socket:
module.exports = () => {
// required to close the systemd-log-transport if it is used
process.emit("beforeExit");
};
I appreciate your work on this project, it's been very helpful!
The text was updated successfully, but these errors were encountered:
Hey, I ran into Jest hanging for me due to the import-time construction of the socket. I would suggest removing the default socket functionality from this software & requiring the user initialize & manage the lifecycle of their own objects.
In the meanwhile, I've worked around this in two ways. I've changed my import to be conditional:
and I've added a jest
globalTeardown
script to trigger the closing of this socket:I appreciate your work on this project, it's been very helpful!
The text was updated successfully, but these errors were encountered: