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:
parent
573bf3c160
commit
d0a7ec981c
2 changed files with 7 additions and 0 deletions
|
@ -731,6 +731,9 @@ if (isWindows) {
|
||||||
// @ts-ignore TS doesn't work well with ES5 classes
|
// @ts-ignore TS doesn't work well with ES5 classes
|
||||||
const process = new Process();
|
const process = new Process();
|
||||||
|
|
||||||
|
/* Set owned property */
|
||||||
|
process.versions = versions;
|
||||||
|
|
||||||
Object.defineProperty(process, Symbol.toStringTag, {
|
Object.defineProperty(process, Symbol.toStringTag, {
|
||||||
enumerable: false,
|
enumerable: false,
|
||||||
writable: true,
|
writable: true,
|
||||||
|
|
|
@ -1116,3 +1116,7 @@ Deno.test("process.listeners - include SIG* events", () => {
|
||||||
process.off("SIGINT", listener2);
|
process.off("SIGINT", listener2);
|
||||||
assertEquals(process.listeners("SIGINT").length, 0);
|
assertEquals(process.listeners("SIGINT").length, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Deno.test(function processVersionsOwnProperty() {
|
||||||
|
assert(Object.prototype.hasOwnProperty.call(process, "versions"));
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in a new issue