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/signal_test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/tests/unit/signal_test.ts') diff --git a/cli/tests/unit/signal_test.ts b/cli/tests/unit/signal_test.ts index 86092a298..25143da1f 100644 --- a/cli/tests/unit/signal_test.ts +++ b/cli/tests/unit/signal_test.ts @@ -185,13 +185,13 @@ Deno.test( permissions: { run: true, read: true }, }, async function canExitWhileListeningToSignal() { - const { code } = await Deno.spawn(Deno.execPath(), { + const { code } = await new Deno.Command(Deno.execPath(), { args: [ "eval", "--unstable", "Deno.addSignalListener('SIGINT', () => {})", ], - }); + }).output(); assertEquals(code, 0); }, ); -- cgit v1.2.3