diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-12-02 14:43:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-02 14:43:17 +0100 |
| commit | 4d07ed0efa8f0e2cab1a33f1b7b6a3627bfce69f (patch) | |
| tree | 898aadf1ae739190ed98ec463824f7e9ca8f48eb /cli/tests/testdata/test | |
| parent | 6982c74e11ec8294ed5bd53d2a9d316d7e20e7d2 (diff) | |
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.
Diffstat (limited to 'cli/tests/testdata/test')
| -rw-r--r-- | cli/tests/testdata/test/captured_output.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/tests/testdata/test/captured_output.ts b/cli/tests/testdata/test/captured_output.ts index 2e6aec948..43295f027 100644 --- a/cli/tests/testdata/test/captured_output.ts +++ b/cli/tests/testdata/test/captured_output.ts @@ -4,21 +4,21 @@ Deno.test("output", async () => { }); await p.status(); await p.close(); - Deno.spawnSync(Deno.execPath(), { + new Deno.Command(Deno.execPath(), { args: ["eval", "console.log(2); console.error(3);"], stdout: "inherit", stderr: "inherit", - }); - await Deno.spawn(Deno.execPath(), { + }).outputSync(); + await new Deno.Command(Deno.execPath(), { args: ["eval", "console.log(4); console.error(5);"], stdout: "inherit", stderr: "inherit", - }); - const c = await Deno.spawnChild(Deno.execPath(), { + }).output(); + const c = new Deno.Command(Deno.execPath(), { args: ["eval", "console.log(6); console.error(7);"], stdout: "inherit", stderr: "inherit", - }); + }).spawn(); await c.status; const worker = new Worker( import.meta.resolve("./captured_output.worker.js"), |
