mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
chore(unstable): rename Deno.getUid() and Deno.getGid() (#16432)
This commit renames `Deno.getUid()` to `Deno.uid()` and renames `Deno.getGid()` to `Deno.gid()`.
This commit is contained in:
parent
f4f1f4f0b6
commit
37340e2386
9 changed files with 38 additions and 38 deletions
|
@ -241,21 +241,21 @@ Deno.test(
|
|||
},
|
||||
);
|
||||
|
||||
Deno.test({ permissions: { sys: ["getUid"] } }, function getUid() {
|
||||
Deno.test({ permissions: { sys: ["uid"] } }, function getUid() {
|
||||
if (Deno.build.os === "windows") {
|
||||
assertEquals(Deno.getUid(), null);
|
||||
assertEquals(Deno.uid(), null);
|
||||
} else {
|
||||
const uid = Deno.getUid();
|
||||
const uid = Deno.uid();
|
||||
assert(typeof uid === "number");
|
||||
assert(uid > 0);
|
||||
}
|
||||
});
|
||||
|
||||
Deno.test({ permissions: { sys: ["getGid"] } }, function getGid() {
|
||||
Deno.test({ permissions: { sys: ["gid"] } }, function getGid() {
|
||||
if (Deno.build.os === "windows") {
|
||||
assertEquals(Deno.getGid(), null);
|
||||
assertEquals(Deno.gid(), null);
|
||||
} else {
|
||||
const gid = Deno.getGid();
|
||||
const gid = Deno.gid();
|
||||
assert(typeof gid === "number");
|
||||
assert(gid > 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue