mirror of
https://github.com/denoland/deno.git
synced 2024-12-26 17:19:06 -05:00
fix(node): polyfill process.title (#20044)
Closes https://github.com/denoland/deno/issues/19777
This commit is contained in:
parent
8d8a89ceea
commit
6405b5f454
2 changed files with 20 additions and 0 deletions
|
@ -764,3 +764,13 @@ Deno.test({
|
|||
assert(typeof process.stdout.isTTY === "boolean");
|
||||
},
|
||||
});
|
||||
|
||||
Deno.test({
|
||||
name: "process.title",
|
||||
fn() {
|
||||
assertEquals(process.title, "deno");
|
||||
// Verify that setting the value has no effect.
|
||||
process.title = "foo";
|
||||
assertEquals(process.title, "deno");
|
||||
},
|
||||
});
|
||||
|
|
|
@ -364,6 +364,16 @@ class Process extends EventEmitter {
|
|||
return arch;
|
||||
}
|
||||
|
||||
get title() {
|
||||
return "deno";
|
||||
}
|
||||
|
||||
set title(_value) {
|
||||
// NOTE(bartlomieju): this is a noop. Node.js doesn't guarantee that the
|
||||
// process name will be properly set and visible from other tools anyway.
|
||||
// Might revisit in the future.
|
||||
}
|
||||
|
||||
/**
|
||||
* https://nodejs.org/api/process.html#process_process_argv
|
||||
* Read permissions are required in order to get the executable route
|
||||
|
|
Loading…
Reference in a new issue