1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

fix(ext/node): make process.versions own property (#24240)

This commit is contained in:
Divy Srivastava 2024-06-18 16:33:03 +05:30 committed by GitHub
parent 8c4b33db0d
commit 10ac3bb091
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View file

@ -731,6 +731,9 @@ if (isWindows) {
// @ts-ignore TS doesn't work well with ES5 classes
const process = new Process();
/* Set owned property */
process.versions = versions;
Object.defineProperty(process, Symbol.toStringTag, {
enumerable: false,
writable: true,

View file

@ -1116,3 +1116,7 @@ Deno.test("process.listeners - include SIG* events", () => {
process.off("SIGINT", listener2);
assertEquals(process.listeners("SIGINT").length, 0);
});
Deno.test(function processVersionsOwnProperty() {
assert(Object.prototype.hasOwnProperty.call(process, "versions"));
});