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/run/lock_write_fetch | |
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/run/lock_write_fetch')
-rw-r--r-- | cli/tests/testdata/run/lock_write_fetch/main.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/tests/testdata/run/lock_write_fetch/main.ts b/cli/tests/testdata/run/lock_write_fetch/main.ts index 3e6892cf0..57bc54d02 100644 --- a/cli/tests/testdata/run/lock_write_fetch/main.ts +++ b/cli/tests/testdata/run/lock_write_fetch/main.ts @@ -4,7 +4,7 @@ try { // pass } -const fetchProc = await Deno.spawn(Deno.execPath(), { +const fetchProc = await new Deno.Command(Deno.execPath(), { stdout: "null", stderr: "null", args: [ @@ -15,11 +15,11 @@ const fetchProc = await Deno.spawn(Deno.execPath(), { "--cert=tls/RootCA.pem", "run/https_import.ts", ], -}); +}).output(); console.log(`fetch code: ${fetchProc.code}`); -const fetchCheckProc = await Deno.spawn(Deno.execPath(), { +const fetchCheckProc = await new Deno.Command(Deno.execPath(), { stdout: "null", stderr: "null", args: [ @@ -28,13 +28,13 @@ const fetchCheckProc = await Deno.spawn(Deno.execPath(), { "--cert=tls/RootCA.pem", "run/https_import.ts", ], -}); +}).output(); console.log(`fetch check code: ${fetchCheckProc.code}`); Deno.removeSync("./lock_write_fetch.json"); -const runProc = await Deno.spawn(Deno.execPath(), { +const runProc = await new Deno.Command(Deno.execPath(), { stdout: "null", stderr: "null", args: [ @@ -45,7 +45,7 @@ const runProc = await Deno.spawn(Deno.execPath(), { "run/lock_write_fetch/file_exists.ts", "lock_write_fetch.json", ], -}); +}).output(); console.log(`run code: ${runProc.code}`); |