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 6f7dceb98e..9f84afe354 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."); }); } diff --git a/cli/tests/testdata/test/captured_output.ts b/cli/tests/testdata/test/captured_output.ts index 905156fd41..3eed249a2e 100644 --- a/cli/tests/testdata/test/captured_output.ts +++ b/cli/tests/testdata/test/captured_output.ts @@ -1,10 +1,7 @@ Deno.test("output", async () => { - // deno-lint-ignore no-deprecated-deno-api - const p = Deno.run({ - cmd: [Deno.execPath(), "eval", "console.log(0); console.error(1);"], - }); - await p.status(); - await p.close(); + await new Deno.Command(Deno.execPath(), { + args: ["eval", "console.log(0); console.error(1);"], + }).spawn().status; new Deno.Command(Deno.execPath(), { args: ["eval", "console.log(2); console.error(3);"], stdout: "inherit",