summaryrefslogtreecommitdiff
path: root/cli/tests/unit/tls_test.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-12-02 14:43:17 +0100
committerGitHub <noreply@github.com>2022-12-02 14:43:17 +0100
commit4d07ed0efa8f0e2cab1a33f1b7b6a3627bfce69f (patch)
tree898aadf1ae739190ed98ec463824f7e9ca8f48eb /cli/tests/unit/tls_test.ts
parent6982c74e11ec8294ed5bd53d2a9d316d7e20e7d2 (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/unit/tls_test.ts')
-rw-r--r--cli/tests/unit/tls_test.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/tests/unit/tls_test.ts b/cli/tests/unit/tls_test.ts
index d3ef4d0bf..e5ad6e66c 100644
--- a/cli/tests/unit/tls_test.ts
+++ b/cli/tests/unit/tls_test.ts
@@ -1046,9 +1046,9 @@ function createHttpsListener(port: number): Deno.Listener {
}
async function curl(url: string): Promise<string> {
- const { success, code, stdout } = await Deno.spawn("curl", {
+ const { success, code, stdout } = await new Deno.Command("curl", {
args: ["--insecure", url],
- });
+ }).output();
if (!success) {
throw new Error(`curl ${url} failed: ${code}`);