mirror of
https://github.com/denoland/deno.git
synced 2024-11-30 16:40:57 -05:00
195b17ae12
Towards #22079
34 lines
633 B
JavaScript
34 lines
633 B
JavaScript
import { runEcho as runEcho2 } from "http://localhost:4545/run/warn_on_deprecated_api/mod.ts";
|
|
|
|
// @ts-ignore `Deno.run()` was soft-removed in Deno 2.
|
|
const p = Deno.run({
|
|
cmd: [
|
|
Deno.execPath(),
|
|
"eval",
|
|
"console.log('hello world')",
|
|
],
|
|
});
|
|
await p.status();
|
|
p.close();
|
|
|
|
async function runEcho() {
|
|
// @ts-ignore `Deno.run()` was soft-removed in Deno 2.
|
|
const p = Deno.run({
|
|
cmd: [
|
|
Deno.execPath(),
|
|
"eval",
|
|
"console.log('hello world')",
|
|
],
|
|
});
|
|
await p.status();
|
|
p.close();
|
|
}
|
|
|
|
await runEcho();
|
|
await runEcho();
|
|
|
|
for (let i = 0; i < 10; i++) {
|
|
await runEcho();
|
|
}
|
|
|
|
await runEcho2();
|