summaryrefslogtreecommitdiff
path: root/cli/tests/unit/chown_test.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-12-02 14:43:17 +0100
committerGitHub <noreply@github.com>2022-12-02 14:43:17 +0100
commit4d07ed0efa8f0e2cab1a33f1b7b6a3627bfce69f (patch)
tree898aadf1ae739190ed98ec463824f7e9ca8f48eb /cli/tests/unit/chown_test.ts
parent6982c74e11ec8294ed5bd53d2a9d316d7e20e7d2 (diff)
chore: rewrite tests and utils to use Deno.Command API (#16895)
Since "Deno.spawn()", "Deno.spawnSync()" and "Deno.spawnChild" are getting deprecated, this commits rewrites all tests and utilities to use "Deno.Command" API instead.
Diffstat (limited to 'cli/tests/unit/chown_test.ts')
-rw-r--r--cli/tests/unit/chown_test.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/tests/unit/chown_test.ts b/cli/tests/unit/chown_test.ts
index 2fa203e18..dd23627ae 100644
--- a/cli/tests/unit/chown_test.ts
+++ b/cli/tests/unit/chown_test.ts
@@ -5,12 +5,12 @@ import { assertEquals, assertRejects, assertThrows } from "./test_util.ts";
async function getUidAndGid(): Promise<{ uid: number; gid: number }> {
// get the user ID and group ID of the current process
- const uidProc = await Deno.spawn("id", {
+ const uidProc = await new Deno.Command("id", {
args: ["-u"],
- });
- const gidProc = await Deno.spawn("id", {
+ }).output();
+ const gidProc = await new Deno.Command("id", {
args: ["-g"],
- });
+ }).output();
assertEquals(uidProc.code, 0);
assertEquals(gidProc.code, 0);