diff options
Diffstat (limited to 'tests/testdata/run/warn_on_deprecated_api/main.js')
-rw-r--r-- | tests/testdata/run/warn_on_deprecated_api/main.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/testdata/run/warn_on_deprecated_api/main.js b/tests/testdata/run/warn_on_deprecated_api/main.js new file mode 100644 index 000000000..a464be60a --- /dev/null +++ b/tests/testdata/run/warn_on_deprecated_api/main.js @@ -0,0 +1,32 @@ +import { runEcho as runEcho2 } from "http://localhost:4545/run/warn_on_deprecated_api/mod.ts"; + +const p = Deno.run({ + cmd: [ + Deno.execPath(), + "eval", + "console.log('hello world')", + ], +}); +await p.status(); +p.close(); + +async function runEcho() { + 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(); |