diff options
author | Colin Ihrig <cjihrig@gmail.com> | 2022-10-26 16:37:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-26 16:37:48 -0400 |
commit | 37340e23865b17b1466a7e32997b0add96dd3806 (patch) | |
tree | 4e72b47e33d2cff14a8b62231a9fa0555e8492a0 /cli/tests | |
parent | f4f1f4f0b64030b744cfb43693af321ea8332bf4 (diff) |
chore(unstable): rename Deno.getUid() and Deno.getGid() (#16432)
This commit renames `Deno.getUid()` to `Deno.uid()` and renames
`Deno.getGid()` to `Deno.gid()`.
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/unit/os_test.ts | 12 | ||||
-rw-r--r-- | cli/tests/unit/permissions_test.ts | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/cli/tests/unit/os_test.ts b/cli/tests/unit/os_test.ts index d620ae4e3..a7329ddb4 100644 --- a/cli/tests/unit/os_test.ts +++ b/cli/tests/unit/os_test.ts @@ -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); } diff --git a/cli/tests/unit/permissions_test.ts b/cli/tests/unit/permissions_test.ts index c0945bb59..3387913e8 100644 --- a/cli/tests/unit/permissions_test.ts +++ b/cli/tests/unit/permissions_test.ts @@ -25,8 +25,8 @@ Deno.test(async function permissionSysValidKind() { await Deno.permissions.query({ name: "sys", kind: "networkInterfaces" }); await Deno.permissions.query({ name: "sys", kind: "systemMemoryInfo" }); await Deno.permissions.query({ name: "sys", kind: "hostname" }); - await Deno.permissions.query({ name: "sys", kind: "getUid" }); - await Deno.permissions.query({ name: "sys", kind: "getGid" }); + await Deno.permissions.query({ name: "sys", kind: "uid" }); + await Deno.permissions.query({ name: "sys", kind: "gid" }); }); Deno.test(async function permissionSysInvalidKind() { |