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/testdata/run/089_run_allow_list.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cli/tests/testdata/run/089_run_allow_list.ts') diff --git a/cli/tests/testdata/run/089_run_allow_list.ts b/cli/tests/testdata/run/089_run_allow_list.ts index d7bc8e195..d9cabba84 100644 --- a/cli/tests/testdata/run/089_run_allow_list.ts +++ b/cli/tests/testdata/run/089_run_allow_list.ts @@ -1,12 +1,12 @@ try { - await Deno.spawn("ls"); + await new Deno.Command("ls").output(); } catch (e) { console.log(e); } -const { success } = await Deno.spawn("curl", { +const { success } = await new Deno.Command("curl", { args: ["--help"], stdout: "null", stderr: "inherit", -}); +}).output(); console.log(success); -- cgit v1.2.3