-
-
Notifications
You must be signed in to change notification settings - Fork 35.2k
process.hrtime.bigint() comes back as undefined #43920
Copy link
Copy link
Closed as not planned
Labels
processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.
Description
Version
16.15.1
Platform
Linux XXX 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
I have a nestjs app that gets tested using jest. Sometimes when the tests are being run on our build machine process.hrtime.bigint() comes back as undefined. I have not been able to repro this locally.
How often does it reproduce? Is there a required condition?
Randomly on build machine.
What is the expected behavior?
It's never undefined.
What do you see instead?
undefined
export function getHrTimeBigInt(): bigint {
const hrTimeBigInt = process.hrtime.bigint();
if (hrTimeBigInt === undefined) {
getLogger().error(`Hell has frozen over bigint is undefined`);
return BigInt(0);
}
return hrTimeBigInt;
}Only when tests are run on our build machine
console.error
[winston] Attempt to write logs with no transports {"message":"Hell has frozen over bigint is undefined","level":"error"}Additional information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.