diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2022-01-31 14:44:19 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-31 14:44:19 +0900 |
commit | 49a0db0d2a2a697320ea95bacaca9bc61199c951 (patch) | |
tree | 4c5d7557afe1c93821ac5259e999e776f537041d /cli/tests | |
parent | 245f69256b9e22f7759b887e82138ad3844a8cf4 (diff) |
feat(unstable): add Deno.getUid (#13496)
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/unit/os_test.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/tests/unit/os_test.ts b/cli/tests/unit/os_test.ts index bd6bc5747..a469c8c9f 100644 --- a/cli/tests/unit/os_test.ts +++ b/cli/tests/unit/os_test.ts @@ -202,3 +202,13 @@ Deno.test({ permissions: { env: true } }, function systemMemoryInfo() { assert(info.swapTotal >= 0); assert(info.swapFree >= 0); }); + +Deno.test({ permissions: { env: true } }, function getUid() { + if (Deno.build.os === "windows") { + assertEquals(Deno.getUid(), null); + } else { + const uid = Deno.getUid(); + assert(typeof uid === "number"); + assert(uid > 0); + } +}); |