summaryrefslogtreecommitdiff
path: root/std/examples
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-11-20 18:01:58 +0100
committerGitHub <noreply@github.com>2020-11-20 18:01:58 +0100
commite35e8981f0280905836d3b68fd5ceb6e3c2bc270 (patch)
tree6dafe7635d79c8b2c92fb32bfc43e33b46c77a25 /std/examples
parent91f293442d5bfb28212b5b13b536ceae06427c99 (diff)
test(std): make test output less noisy (#8445)
This commit makes output of std/ tests less noisy by passing "--quiet" flag to Deno subprocesses run as part of test suite.
Diffstat (limited to 'std/examples')
-rw-r--r--std/examples/cat_test.ts1
-rw-r--r--std/examples/catj_test.ts9
-rw-r--r--std/examples/chat/server_test.ts1
-rw-r--r--std/examples/colors_test.ts2
-rw-r--r--std/examples/curl_test.ts1
-rw-r--r--std/examples/echo_server_test.ts2
-rw-r--r--std/examples/test.ts1
-rw-r--r--std/examples/welcome_test.ts2
-rw-r--r--std/examples/xeval_test.ts3
9 files changed, 17 insertions, 5 deletions
diff --git a/std/examples/cat_test.ts b/std/examples/cat_test.ts
index cd88d1f3d..e151d5c62 100644
--- a/std/examples/cat_test.ts
+++ b/std/examples/cat_test.ts
@@ -10,6 +10,7 @@ Deno.test("[examples/cat] print multiple files", async () => {
cmd: [
Deno.execPath(),
"run",
+ "--quiet",
"--allow-read",
"cat.ts",
"testdata/cat/hello.txt",
diff --git a/std/examples/catj_test.ts b/std/examples/catj_test.ts
index 031a161c9..7a2d968f4 100644
--- a/std/examples/catj_test.ts
+++ b/std/examples/catj_test.ts
@@ -82,7 +82,14 @@ function catj(
...files: string[]
): Deno.Process<Deno.RunOptions & { stdin: "piped"; stdout: "piped" }> {
return Deno.run({
- cmd: [Deno.execPath(), "run", "--allow-read", "catj.ts", ...files],
+ cmd: [
+ Deno.execPath(),
+ "run",
+ "--quiet",
+ "--allow-read",
+ "catj.ts",
+ ...files,
+ ],
cwd: moduleDir,
stdin: "piped",
stdout: "piped",
diff --git a/std/examples/chat/server_test.ts b/std/examples/chat/server_test.ts
index 5e30b4ba7..9bc1c9823 100644
--- a/std/examples/chat/server_test.ts
+++ b/std/examples/chat/server_test.ts
@@ -14,6 +14,7 @@ async function startServer(): Promise<
cmd: [
Deno.execPath(),
"run",
+ "--quiet",
"--allow-net",
"--allow-read",
"server.ts",
diff --git a/std/examples/colors_test.ts b/std/examples/colors_test.ts
index fd9aa21da..cf3b8f4c6 100644
--- a/std/examples/colors_test.ts
+++ b/std/examples/colors_test.ts
@@ -7,7 +7,7 @@ const moduleDir = dirname(fromFileUrl(import.meta.url));
Deno.test("[examples/colors] print a colored text", async () => {
const decoder = new TextDecoder();
const process = Deno.run({
- cmd: [Deno.execPath(), "run", "colors.ts"],
+ cmd: [Deno.execPath(), "run", "--quiet", "colors.ts"],
cwd: moduleDir,
stdout: "piped",
});
diff --git a/std/examples/curl_test.ts b/std/examples/curl_test.ts
index 63b78bff6..86beec79b 100644
--- a/std/examples/curl_test.ts
+++ b/std/examples/curl_test.ts
@@ -20,6 +20,7 @@ Deno.test({
cmd: [
Deno.execPath(),
"run",
+ "--quiet",
"--allow-net",
"curl.ts",
"http://localhost:8081",
diff --git a/std/examples/echo_server_test.ts b/std/examples/echo_server_test.ts
index 5334cb610..9a0e34e3d 100644
--- a/std/examples/echo_server_test.ts
+++ b/std/examples/echo_server_test.ts
@@ -9,7 +9,7 @@ Deno.test("[examples/echo_server]", async () => {
const encoder = new TextEncoder();
const decoder = new TextDecoder();
const process = Deno.run({
- cmd: [Deno.execPath(), "run", "--allow-net", "echo_server.ts"],
+ cmd: [Deno.execPath(), "run", "--quiet", "--allow-net", "echo_server.ts"],
cwd: moduleDir,
stdout: "piped",
});
diff --git a/std/examples/test.ts b/std/examples/test.ts
index a7b09d5bc..cf4d821f9 100644
--- a/std/examples/test.ts
+++ b/std/examples/test.ts
@@ -19,6 +19,7 @@ Deno.test("catSmoke", async function (): Promise<void> {
cmd: [
Deno.execPath(),
"run",
+ "--quiet",
"--allow-read",
relative(Deno.cwd(), resolve(moduleDir, "cat.ts")),
relative(Deno.cwd(), resolve(moduleDir, "..", "README.md")),
diff --git a/std/examples/welcome_test.ts b/std/examples/welcome_test.ts
index 626527bca..43da0e87b 100644
--- a/std/examples/welcome_test.ts
+++ b/std/examples/welcome_test.ts
@@ -7,7 +7,7 @@ const moduleDir = dirname(fromFileUrl(import.meta.url));
Deno.test("[examples/welcome] print a welcome message", async () => {
const decoder = new TextDecoder();
const process = Deno.run({
- cmd: [Deno.execPath(), "run", "welcome.ts"],
+ cmd: [Deno.execPath(), "run", "--quiet", "welcome.ts"],
cwd: moduleDir,
stdout: "piped",
});
diff --git a/std/examples/xeval_test.ts b/std/examples/xeval_test.ts
index 6d24d08bb..fc244d853 100644
--- a/std/examples/xeval_test.ts
+++ b/std/examples/xeval_test.ts
@@ -38,6 +38,7 @@ Deno.test({
cmd: [
Deno.execPath(),
"run",
+ "--quiet",
xevalPath,
"--replvar=abc",
"console.log(abc)",
@@ -58,7 +59,7 @@ Deno.test({
Deno.test("xevalCliSyntaxError", async function (): Promise<void> {
const p = Deno.run({
- cmd: [Deno.execPath(), "run", xevalPath, "("],
+ cmd: [Deno.execPath(), "run", "--quiet", xevalPath, "("],
cwd: moduleDir,
stdin: "null",
stdout: "piped",