summaryrefslogtreecommitdiff
path: root/cli/tests/unit/os_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit/os_test.ts')
-rw-r--r--cli/tests/unit/os_test.ts10
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);
+ }
+});