summaryrefslogtreecommitdiff
path: root/std/examples/tests
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2020-03-29 04:03:49 +1100
committerGitHub <noreply@github.com>2020-03-28 13:03:49 -0400
commitbced52505f32d6cca4f944bb610a8a26767908a8 (patch)
treeda49a5df4b7bd6f8306248069228cd6bd0db1303 /std/examples/tests
parent1397b8e0e7c85762e19d88fde103342bfa563360 (diff)
Update to Prettier 2 and use ES Private Fields (#4498)
Diffstat (limited to 'std/examples/tests')
-rw-r--r--std/examples/tests/cat_test.ts4
-rw-r--r--std/examples/tests/catj_test.ts6
-rw-r--r--std/examples/tests/colors_test.ts2
-rw-r--r--std/examples/tests/curl_test.ts4
-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.ts12
7 files changed, 16 insertions, 16 deletions
diff --git a/std/examples/tests/cat_test.ts b/std/examples/tests/cat_test.ts
index 0f17b798d..b12a6916f 100644
--- a/std/examples/tests/cat_test.ts
+++ b/std/examples/tests/cat_test.ts
@@ -9,10 +9,10 @@ Deno.test("[examples/cat] print multiple files", async () => {
"--allow-read",
"cat.ts",
"testdata/cat/hello.txt",
- "testdata/cat/world.txt"
+ "testdata/cat/world.txt",
],
cwd: "examples",
- stdout: "piped"
+ stdout: "piped",
});
try {
diff --git a/std/examples/tests/catj_test.ts b/std/examples/tests/catj_test.ts
index 3f246a65f..53b36bef8 100644
--- a/std/examples/tests/catj_test.ts
+++ b/std/examples/tests/catj_test.ts
@@ -12,7 +12,7 @@ Deno.test("[examples/catj] print an array", async () => {
".[1] = 100",
'.[2].key = "value"',
'.[2].array[0] = "foo"',
- '.[2].array[1] = "bar"'
+ '.[2].array[1] = "bar"',
].join("\n");
assertStrictEq(actual, expected);
@@ -31,7 +31,7 @@ Deno.test("[examples/catj] print an object", async () => {
const expected = [
'.string = "foobar"',
".number = 123",
- '.array[0].message = "hello"'
+ '.array[0].message = "hello"',
].join("\n");
assertStrictEq(actual, expected);
@@ -81,6 +81,6 @@ function catj(...files: string[]): Deno.Process {
cwd: "examples",
stdin: "piped",
stdout: "piped",
- env: { NO_COLOR: "true" }
+ env: { NO_COLOR: "true" },
});
}
diff --git a/std/examples/tests/colors_test.ts b/std/examples/tests/colors_test.ts
index 7c01cd8d6..ac779adb8 100644
--- a/std/examples/tests/colors_test.ts
+++ b/std/examples/tests/colors_test.ts
@@ -6,7 +6,7 @@ Deno.test("[examples/colors] print a colored text", async () => {
const process = Deno.run({
cmd: [Deno.execPath(), "colors.ts"],
cwd: "examples",
- stdout: "piped"
+ stdout: "piped",
});
try {
const output = await process.output();
diff --git a/std/examples/tests/curl_test.ts b/std/examples/tests/curl_test.ts
index 8d7634525..9b2870216 100644
--- a/std/examples/tests/curl_test.ts
+++ b/std/examples/tests/curl_test.ts
@@ -16,7 +16,7 @@ Deno.test({
const process = Deno.run({
cmd: [Deno.execPath(), "--allow-net", "curl.ts", "http://localhost:8081"],
cwd: "examples",
- stdout: "piped"
+ stdout: "piped",
});
try {
@@ -30,5 +30,5 @@ Deno.test({
process.close();
await serverPromise;
}
- }
+ },
});
diff --git a/std/examples/tests/echo_server_test.ts b/std/examples/tests/echo_server_test.ts
index dd7336023..fecc7d6a6 100644
--- a/std/examples/tests/echo_server_test.ts
+++ b/std/examples/tests/echo_server_test.ts
@@ -8,7 +8,7 @@ Deno.test("[examples/echo_server]", async () => {
const process = Deno.run({
cmd: [Deno.execPath(), "--allow-net", "echo_server.ts"],
cwd: "examples",
- stdout: "piped"
+ stdout: "piped",
});
let conn: Deno.Conn | undefined;
diff --git a/std/examples/tests/welcome_test.ts b/std/examples/tests/welcome_test.ts
index 60c55dc0b..cacb77ab9 100644
--- a/std/examples/tests/welcome_test.ts
+++ b/std/examples/tests/welcome_test.ts
@@ -6,7 +6,7 @@ Deno.test("[examples/welcome] print a welcome message", async () => {
const process = Deno.run({
cmd: [Deno.execPath(), "welcome.ts"],
cwd: "examples",
- stdout: "piped"
+ stdout: "piped",
});
try {
const output = await process.output();
diff --git a/std/examples/tests/xeval_test.ts b/std/examples/tests/xeval_test.ts
index 92e9e1bfe..25f99c9f0 100644
--- a/std/examples/tests/xeval_test.ts
+++ b/std/examples/tests/xeval_test.ts
@@ -5,7 +5,7 @@ import { decode, encode } from "../../strings/mod.ts";
import {
assertEquals,
assertStrContains,
- assert
+ assert,
} from "../../testing/asserts.ts";
const { execPath, run } = Deno;
@@ -18,7 +18,7 @@ Deno.test(async function xevalSuccess(): Promise<void> {
Deno.test(async function xevalDelimiter(): Promise<void> {
const chunks: string[] = [];
await xeval(stringsReader("!MADMADAMADAM!"), ($): number => chunks.push($), {
- delimiter: "MADAM"
+ delimiter: "MADAM",
});
assertEquals(chunks, ["!MAD", "ADAM!"]);
});
@@ -27,12 +27,12 @@ const xevalPath = "examples/xeval.ts";
Deno.test({
name: "xevalCliReplvar",
- fn: async function(): Promise<void> {
+ fn: async function (): Promise<void> {
const p = run({
cmd: [execPath(), xevalPath, "--replvar=abc", "console.log(abc)"],
stdin: "piped",
stdout: "piped",
- stderr: "null"
+ stderr: "null",
});
assert(p.stdin != null);
await p.stdin.write(encode("hello"));
@@ -40,7 +40,7 @@ Deno.test({
assertEquals(await p.status(), { code: 0, success: true });
assertEquals(decode(await p.output()).trimEnd(), "hello");
p.close();
- }
+ },
});
Deno.test(async function xevalCliSyntaxError(): Promise<void> {
@@ -48,7 +48,7 @@ Deno.test(async function xevalCliSyntaxError(): Promise<void> {
cmd: [execPath(), xevalPath, "("],
stdin: "null",
stdout: "piped",
- stderr: "piped"
+ stderr: "piped",
});
assertEquals(await p.status(), { code: 1, success: false });
assertEquals(decode(await p.output()), "");