summaryrefslogtreecommitdiff
path: root/std/examples
diff options
context:
space:
mode:
Diffstat (limited to 'std/examples')
-rw-r--r--std/examples/chat/server_test.ts1
-rw-r--r--std/examples/tests/cat_test.ts1
-rw-r--r--std/examples/tests/catj_test.ts2
-rw-r--r--std/examples/tests/colors_test.ts2
-rw-r--r--std/examples/tests/curl_test.ts8
-rw-r--r--std/examples/tests/echo_server_test.ts2
-rw-r--r--std/examples/tests/welcome_test.ts2
-rw-r--r--std/examples/tests/xeval_test.ts4
8 files changed, 15 insertions, 7 deletions
diff --git a/std/examples/chat/server_test.ts b/std/examples/chat/server_test.ts
index 76b1f1bf5..d1c1a8afa 100644
--- a/std/examples/chat/server_test.ts
+++ b/std/examples/chat/server_test.ts
@@ -12,6 +12,7 @@ async function startServer(): Promise<Deno.Process> {
// TODO(lucacasonato): remove unstable once possible
cmd: [
Deno.execPath(),
+ "run",
"--allow-net",
"--allow-read",
"--unstable",
diff --git a/std/examples/tests/cat_test.ts b/std/examples/tests/cat_test.ts
index b12a6916f..4633c5750 100644
--- a/std/examples/tests/cat_test.ts
+++ b/std/examples/tests/cat_test.ts
@@ -6,6 +6,7 @@ Deno.test("[examples/cat] print multiple files", async () => {
const process = Deno.run({
cmd: [
Deno.execPath(),
+ "run",
"--allow-read",
"cat.ts",
"testdata/cat/hello.txt",
diff --git a/std/examples/tests/catj_test.ts b/std/examples/tests/catj_test.ts
index 53b36bef8..c3eb61f51 100644
--- a/std/examples/tests/catj_test.ts
+++ b/std/examples/tests/catj_test.ts
@@ -77,7 +77,7 @@ Deno.test("[examples/catj] read from stdin", async () => {
function catj(...files: string[]): Deno.Process {
return Deno.run({
- cmd: [Deno.execPath(), "--allow-read", "catj.ts", ...files],
+ cmd: [Deno.execPath(), "run", "--allow-read", "catj.ts", ...files],
cwd: "examples",
stdin: "piped",
stdout: "piped",
diff --git a/std/examples/tests/colors_test.ts b/std/examples/tests/colors_test.ts
index ac779adb8..90c469c00 100644
--- a/std/examples/tests/colors_test.ts
+++ b/std/examples/tests/colors_test.ts
@@ -4,7 +4,7 @@ import { assertStrictEq } from "../../testing/asserts.ts";
Deno.test("[examples/colors] print a colored text", async () => {
const decoder = new TextDecoder();
const process = Deno.run({
- cmd: [Deno.execPath(), "colors.ts"],
+ cmd: [Deno.execPath(), "run", "colors.ts"],
cwd: "examples",
stdout: "piped",
});
diff --git a/std/examples/tests/curl_test.ts b/std/examples/tests/curl_test.ts
index 9b2870216..69e0e52d6 100644
--- a/std/examples/tests/curl_test.ts
+++ b/std/examples/tests/curl_test.ts
@@ -14,7 +14,13 @@ Deno.test({
const decoder = new TextDecoder();
const process = Deno.run({
- cmd: [Deno.execPath(), "--allow-net", "curl.ts", "http://localhost:8081"],
+ cmd: [
+ Deno.execPath(),
+ "run",
+ "--allow-net",
+ "curl.ts",
+ "http://localhost:8081",
+ ],
cwd: "examples",
stdout: "piped",
});
diff --git a/std/examples/tests/echo_server_test.ts b/std/examples/tests/echo_server_test.ts
index 9c413d737..3e6096190 100644
--- a/std/examples/tests/echo_server_test.ts
+++ b/std/examples/tests/echo_server_test.ts
@@ -6,7 +6,7 @@ Deno.test("[examples/echo_server]", async () => {
const encoder = new TextEncoder();
const decoder = new TextDecoder();
const process = Deno.run({
- cmd: [Deno.execPath(), "--allow-net", "echo_server.ts"],
+ cmd: [Deno.execPath(), "run", "--allow-net", "echo_server.ts"],
cwd: "examples",
stdout: "piped",
});
diff --git a/std/examples/tests/welcome_test.ts b/std/examples/tests/welcome_test.ts
index cacb77ab9..d508773c5 100644
--- a/std/examples/tests/welcome_test.ts
+++ b/std/examples/tests/welcome_test.ts
@@ -4,7 +4,7 @@ import { assertStrictEq } from "../../testing/asserts.ts";
Deno.test("[examples/welcome] print a welcome message", async () => {
const decoder = new TextDecoder();
const process = Deno.run({
- cmd: [Deno.execPath(), "welcome.ts"],
+ cmd: [Deno.execPath(), "run", "welcome.ts"],
cwd: "examples",
stdout: "piped",
});
diff --git a/std/examples/tests/xeval_test.ts b/std/examples/tests/xeval_test.ts
index 426f6fe56..eeeac7731 100644
--- a/std/examples/tests/xeval_test.ts
+++ b/std/examples/tests/xeval_test.ts
@@ -29,7 +29,7 @@ Deno.test({
name: "xevalCliReplvar",
fn: async function (): Promise<void> {
const p = run({
- cmd: [execPath(), xevalPath, "--replvar=abc", "console.log(abc)"],
+ cmd: [execPath(), "run", xevalPath, "--replvar=abc", "console.log(abc)"],
stdin: "piped",
stdout: "piped",
stderr: "null",
@@ -45,7 +45,7 @@ Deno.test({
Deno.test("xevalCliSyntaxError", async function (): Promise<void> {
const p = run({
- cmd: [execPath(), xevalPath, "("],
+ cmd: [execPath(), "run", xevalPath, "("],
stdin: "null",
stdout: "piped",
stderr: "piped",