mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
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.
This commit is contained in:
parent
6982c74e11
commit
4d07ed0efa
22 changed files with 104 additions and 104 deletions
|
@ -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}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue