From 4d07ed0efa8f0e2cab1a33f1b7b6a3627bfce69f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 2 Dec 2022 14:43:17 +0100 Subject: 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. --- cli/tests/unit/flock_test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/tests/unit/flock_test.ts') diff --git a/cli/tests/unit/flock_test.ts b/cli/tests/unit/flock_test.ts index 7ece1695c..be463bf12 100644 --- a/cli/tests/unit/flock_test.ts +++ b/cli/tests/unit/flock_test.ts @@ -148,10 +148,10 @@ function runFlockTestProcess(opts: { exclusive: boolean; sync: boolean }) { console.log(JSON.stringify({ enterTime, exitTime })); `; - const process = Deno.spawnChild(Deno.execPath(), { + const process = new Deno.Command(Deno.execPath(), { args: ["eval", "--unstable", scriptText], stdin: "piped", - }); + }).spawn(); const waitSignal = async () => { const reader = process.stdout.getReader({ mode: "byob" }); -- cgit v1.2.3