summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2022-01-31 14:44:19 +0900
committerGitHub <noreply@github.com>2022-01-31 14:44:19 +0900
commit49a0db0d2a2a697320ea95bacaca9bc61199c951 (patch)
tree4c5d7557afe1c93821ac5259e999e776f537041d /cli/tests
parent245f69256b9e22f7759b887e82138ad3844a8cf4 (diff)
feat(unstable): add Deno.getUid (#13496)
Diffstat (limited to 'cli/tests')
-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);
+ }
+});