mirror of
https://github.com/denoland/deno.git
synced 2025-03-04 01:44:26 -05:00
parent
5319b85f14
commit
dda6328745
2 changed files with 14 additions and 0 deletions
|
@ -430,6 +430,14 @@ Process.prototype.config = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Process.prototype.cpuUsage = function () {
|
||||||
|
warnNotImplemented("process.cpuUsage()");
|
||||||
|
return {
|
||||||
|
user: 0,
|
||||||
|
system: 0,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
/** https://nodejs.org/api/process.html#process_process_cwd */
|
/** https://nodejs.org/api/process.html#process_process_cwd */
|
||||||
Process.prototype.cwd = cwd;
|
Process.prototype.cwd = cwd;
|
||||||
|
|
||||||
|
|
|
@ -1131,3 +1131,9 @@ Deno.test(function importedExecArgvTest() {
|
||||||
Deno.test(function importedExecPathTest() {
|
Deno.test(function importedExecPathTest() {
|
||||||
assertEquals(importedExecPath, Deno.execPath());
|
assertEquals(importedExecPath, Deno.execPath());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Deno.test("process.cpuUsage()", () => {
|
||||||
|
const cpuUsage = process.cpuUsage();
|
||||||
|
assert(typeof cpuUsage.user === "number");
|
||||||
|
assert(typeof cpuUsage.system === "number");
|
||||||
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue