From 147bfc9c56d363daaed9ae83d3abc9a61934ed06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 17 Jan 2024 02:18:19 +0100 Subject: refactor: change tests to not rely on Deno.run() (#21961) For https://github.com/denoland/deno/pull/21939 --- .../npm/registry/@denotest/child-process-fork/1.0.0/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cli/tests/testdata/npm/registry/@denotest/child-process-fork') diff --git a/cli/tests/testdata/npm/registry/@denotest/child-process-fork/1.0.0/index.js b/cli/tests/testdata/npm/registry/@denotest/child-process-fork/1.0.0/index.js index 6f7dceb98..9f84afe35 100644 --- a/cli/tests/testdata/npm/registry/@denotest/child-process-fork/1.0.0/index.js +++ b/cli/tests/testdata/npm/registry/@denotest/child-process-fork/1.0.0/index.js @@ -1,13 +1,14 @@ const path = require("path"); function childProcessFork(path) { - const p = Deno.run({ - cmd: [Deno.execPath(), "run", "--unstable", "-A", path], + const command = new Deno.Command(Deno.execPath(), { + args: ["run", "--unstable", "-A", path], env: { "DENO_DONT_USE_INTERNAL_NODE_COMPAT_STATE": Deno[Deno.internal].core.ops.op_npm_process_state(), } }); - p.status().then(() => { + const child = command.spawn(); + child.status.then(() => { console.log("Done."); }); } -- cgit v1.2.3