diff --git a/cli/tests/unit_node/process_test.ts b/cli/tests/unit_node/process_test.ts index 23bf738649ba84..21f873260e14b8 100644 --- a/cli/tests/unit_node/process_test.ts +++ b/cli/tests/unit_node/process_test.ts @@ -121,6 +121,14 @@ Deno.test({ }, }); +Deno.test({ + name: "process.ppid", + fn() { + assertEquals(typeof process.ppid, "number"); + assertEquals(process.ppid, Deno.ppid); + }, +}); + Deno.test({ name: "process.on", async fn() { diff --git a/ext/node/polyfills/process.ts b/ext/node/polyfills/process.ts index 312b8e845e5602..20399bdf90311f 100644 --- a/ext/node/polyfills/process.ts +++ b/ext/node/polyfills/process.ts @@ -558,6 +558,11 @@ class Process extends EventEmitter { return pid; } + /** https://nodejs.org/api/process.html#processppid */ + get ppid() { + return Deno.ppid; + } + /** https://nodejs.org/api/process.html#process_process_platform */ get platform() { if (!platform) {