From 04836dc700a8e22fdb604f0640cb72be5e0194c9 Mon Sep 17 00:00:00 2001 From: tokiedokie Date: Sun, 27 Sep 2020 00:54:26 +0900 Subject: refactor(std/example): Inconsistencies in the example tests (#7684) --- std/examples/cat_test.ts | 29 +++++++++++ std/examples/catj_test.ts | 91 ++++++++++++++++++++++++++++++++++ std/examples/colors_test.ts | 22 ++++++++ std/examples/curl_test.ts | 43 ++++++++++++++++ std/examples/echo_server_test.ts | 47 ++++++++++++++++++ std/examples/test_test.ts | 2 + std/examples/tests/cat_test.ts | 29 ----------- std/examples/tests/catj_test.ts | 91 ---------------------------------- std/examples/tests/colors_test.ts | 22 -------- std/examples/tests/curl_test.ts | 43 ---------------- std/examples/tests/echo_server_test.ts | 47 ------------------ std/examples/tests/test_test.ts | 2 - std/examples/tests/welcome_test.ts | 22 -------- std/examples/tests/xeval_test.ts | 71 -------------------------- std/examples/welcome_test.ts | 22 ++++++++ std/examples/xeval_test.ts | 71 ++++++++++++++++++++++++++ 16 files changed, 327 insertions(+), 327 deletions(-) create mode 100644 std/examples/cat_test.ts create mode 100644 std/examples/catj_test.ts create mode 100644 std/examples/colors_test.ts create mode 100644 std/examples/curl_test.ts create mode 100644 std/examples/echo_server_test.ts create mode 100644 std/examples/test_test.ts delete mode 100644 std/examples/tests/cat_test.ts delete mode 100644 std/examples/tests/catj_test.ts delete mode 100644 std/examples/tests/colors_test.ts delete mode 100644 std/examples/tests/curl_test.ts delete mode 100644 std/examples/tests/echo_server_test.ts delete mode 100644 std/examples/tests/test_test.ts delete mode 100644 std/examples/tests/welcome_test.ts delete mode 100644 std/examples/tests/xeval_test.ts create mode 100644 std/examples/welcome_test.ts create mode 100644 std/examples/xeval_test.ts (limited to 'std/examples') diff --git a/std/examples/cat_test.ts b/std/examples/cat_test.ts new file mode 100644 index 000000000..cd88d1f3d --- /dev/null +++ b/std/examples/cat_test.ts @@ -0,0 +1,29 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. +import { assertStrictEquals } from "../testing/asserts.ts"; +import { dirname, fromFileUrl } from "../path/mod.ts"; + +const moduleDir = dirname(fromFileUrl(import.meta.url)); + +Deno.test("[examples/cat] print multiple files", async () => { + const decoder = new TextDecoder(); + const process = Deno.run({ + cmd: [ + Deno.execPath(), + "run", + "--allow-read", + "cat.ts", + "testdata/cat/hello.txt", + "testdata/cat/world.txt", + ], + cwd: moduleDir, + stdout: "piped", + }); + + try { + const output = await process.output(); + const actual = decoder.decode(output).trim(); + assertStrictEquals(actual, "Hello\nWorld"); + } finally { + process.close(); + } +}); diff --git a/std/examples/catj_test.ts b/std/examples/catj_test.ts new file mode 100644 index 000000000..031a161c9 --- /dev/null +++ b/std/examples/catj_test.ts @@ -0,0 +1,91 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. +import { assertStrictEquals } from "../testing/asserts.ts"; +import { dirname, fromFileUrl } from "../path/mod.ts"; + +const moduleDir = dirname(fromFileUrl(import.meta.url)); + +Deno.test("[examples/catj] print an array", async () => { + const decoder = new TextDecoder(); + const process = catj("testdata/catj/array.json"); + try { + const output = await process.output(); + const actual = decoder.decode(output).trim(); + const expected = [ + '.[0] = "string"', + ".[1] = 100", + '.[2].key = "value"', + '.[2].array[0] = "foo"', + '.[2].array[1] = "bar"', + ].join("\n"); + + assertStrictEquals(actual, expected); + } finally { + process.stdin.close(); + process.close(); + } +}); + +Deno.test("[examples/catj] print an object", async () => { + const decoder = new TextDecoder(); + const process = catj("testdata/catj/object.json"); + try { + const output = await process.output(); + const actual = decoder.decode(output).trim(); + const expected = [ + '.string = "foobar"', + ".number = 123", + '.array[0].message = "hello"', + ].join("\n"); + + assertStrictEquals(actual, expected); + } finally { + process.stdin.close(); + process.close(); + } +}); + +Deno.test("[examples/catj] print multiple files", async () => { + const decoder = new TextDecoder(); + const process = catj( + "testdata/catj/simple-object.json", + "testdata/catj/simple-array.json", + ); + try { + const output = await process.output(); + const actual = decoder.decode(output).trim(); + const expected = ['.message = "hello"', ".[0] = 1", ".[1] = 2"].join("\n"); + + assertStrictEquals(actual, expected); + } finally { + process.stdin.close(); + process.close(); + } +}); + +Deno.test("[examples/catj] read from stdin", async () => { + const decoder = new TextDecoder(); + const process = catj("-"); + const input = `{ "foo": "bar" }`; + try { + await process.stdin.write(new TextEncoder().encode(input)); + process.stdin.close(); + const output = await process.output(); + const actual = decoder.decode(output).trim(); + + assertStrictEquals(actual, '.foo = "bar"'); + } finally { + process.close(); + } +}); + +function catj( + ...files: string[] +): Deno.Process { + return Deno.run({ + cmd: [Deno.execPath(), "run", "--allow-read", "catj.ts", ...files], + cwd: moduleDir, + stdin: "piped", + stdout: "piped", + env: { NO_COLOR: "true" }, + }); +} diff --git a/std/examples/colors_test.ts b/std/examples/colors_test.ts new file mode 100644 index 000000000..fd9aa21da --- /dev/null +++ b/std/examples/colors_test.ts @@ -0,0 +1,22 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. +import { assertStrictEquals } from "../testing/asserts.ts"; +import { dirname, fromFileUrl } from "../path/mod.ts"; + +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"], + cwd: moduleDir, + stdout: "piped", + }); + try { + const output = await process.output(); + const actual = decoder.decode(output).trim(); + const expected = "Hello world!"; + assertStrictEquals(actual, expected); + } finally { + process.close(); + } +}); diff --git a/std/examples/curl_test.ts b/std/examples/curl_test.ts new file mode 100644 index 000000000..63b78bff6 --- /dev/null +++ b/std/examples/curl_test.ts @@ -0,0 +1,43 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. +import { serve } from "../http/server.ts"; +import { assertStrictEquals } from "../testing/asserts.ts"; +import { dirname, fromFileUrl } from "../path/mod.ts"; + +const moduleDir = dirname(fromFileUrl(import.meta.url)); + +Deno.test({ + name: "[examples/curl] send a request to a specified url", + fn: async () => { + const server = serve({ port: 8081 }); + const serverPromise = (async (): Promise => { + for await (const req of server) { + req.respond({ body: "Hello world" }); + } + })(); + + const decoder = new TextDecoder(); + const process = Deno.run({ + cmd: [ + Deno.execPath(), + "run", + "--allow-net", + "curl.ts", + "http://localhost:8081", + ], + cwd: moduleDir, + stdout: "piped", + }); + + try { + const output = await process.output(); + const actual = decoder.decode(output).trim(); + const expected = "Hello world"; + + assertStrictEquals(actual, expected); + } finally { + server.close(); + process.close(); + await serverPromise; + } + }, +}); diff --git a/std/examples/echo_server_test.ts b/std/examples/echo_server_test.ts new file mode 100644 index 000000000..1a5286a0e --- /dev/null +++ b/std/examples/echo_server_test.ts @@ -0,0 +1,47 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. +import { assertStrictEquals, assertNotEquals } from "../testing/asserts.ts"; +import { BufReader, ReadLineResult } from "../io/bufio.ts"; +import { dirname, fromFileUrl } from "../path/mod.ts"; + +const moduleDir = dirname(fromFileUrl(import.meta.url)); + +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"], + cwd: moduleDir, + stdout: "piped", + }); + + let conn: Deno.Conn | undefined; + try { + const processReader = new BufReader(process.stdout); + const message = await processReader.readLine(); + + assertNotEquals(message, null); + assertStrictEquals( + decoder.decode((message as ReadLineResult).line).trim(), + "Listening on 0.0.0.0:8080", + ); + + conn = await Deno.connect({ hostname: "127.0.0.1", port: 8080 }); + const connReader = new BufReader(conn); + + await conn.write(encoder.encode("Hello echo_server\n")); + const result = await connReader.readLine(); + + assertNotEquals(result, null); + + const actualResponse = decoder + .decode((result as ReadLineResult).line) + .trim(); + const expectedResponse = "Hello echo_server"; + + assertStrictEquals(actualResponse, expectedResponse); + } finally { + conn?.close(); + process.stdout.close(); + process.close(); + } +}); diff --git a/std/examples/test_test.ts b/std/examples/test_test.ts new file mode 100644 index 000000000..2c85b664e --- /dev/null +++ b/std/examples/test_test.ts @@ -0,0 +1,2 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. +import "./test.ts"; diff --git a/std/examples/tests/cat_test.ts b/std/examples/tests/cat_test.ts deleted file mode 100644 index 3b6f0d40f..000000000 --- a/std/examples/tests/cat_test.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { assertStrictEquals } from "../../testing/asserts.ts"; -import { resolve, dirname, fromFileUrl } from "../../path/mod.ts"; - -const moduleDir = resolve(dirname(fromFileUrl(import.meta.url)), ".."); - -Deno.test("[examples/cat] print multiple files", async () => { - const decoder = new TextDecoder(); - const process = Deno.run({ - cmd: [ - Deno.execPath(), - "run", - "--allow-read", - "cat.ts", - "testdata/cat/hello.txt", - "testdata/cat/world.txt", - ], - cwd: moduleDir, - stdout: "piped", - }); - - try { - const output = await process.output(); - const actual = decoder.decode(output).trim(); - assertStrictEquals(actual, "Hello\nWorld"); - } finally { - process.close(); - } -}); diff --git a/std/examples/tests/catj_test.ts b/std/examples/tests/catj_test.ts deleted file mode 100644 index c79403421..000000000 --- a/std/examples/tests/catj_test.ts +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { assertStrictEquals } from "../../testing/asserts.ts"; -import { resolve, dirname, fromFileUrl } from "../../path/mod.ts"; - -const moduleDir = resolve(dirname(fromFileUrl(import.meta.url)), ".."); - -Deno.test("[examples/catj] print an array", async () => { - const decoder = new TextDecoder(); - const process = catj("testdata/catj/array.json"); - try { - const output = await process.output(); - const actual = decoder.decode(output).trim(); - const expected = [ - '.[0] = "string"', - ".[1] = 100", - '.[2].key = "value"', - '.[2].array[0] = "foo"', - '.[2].array[1] = "bar"', - ].join("\n"); - - assertStrictEquals(actual, expected); - } finally { - process.stdin.close(); - process.close(); - } -}); - -Deno.test("[examples/catj] print an object", async () => { - const decoder = new TextDecoder(); - const process = catj("testdata/catj/object.json"); - try { - const output = await process.output(); - const actual = decoder.decode(output).trim(); - const expected = [ - '.string = "foobar"', - ".number = 123", - '.array[0].message = "hello"', - ].join("\n"); - - assertStrictEquals(actual, expected); - } finally { - process.stdin.close(); - process.close(); - } -}); - -Deno.test("[examples/catj] print multiple files", async () => { - const decoder = new TextDecoder(); - const process = catj( - "testdata/catj/simple-object.json", - "testdata/catj/simple-array.json", - ); - try { - const output = await process.output(); - const actual = decoder.decode(output).trim(); - const expected = ['.message = "hello"', ".[0] = 1", ".[1] = 2"].join("\n"); - - assertStrictEquals(actual, expected); - } finally { - process.stdin.close(); - process.close(); - } -}); - -Deno.test("[examples/catj] read from stdin", async () => { - const decoder = new TextDecoder(); - const process = catj("-"); - const input = `{ "foo": "bar" }`; - try { - await process.stdin.write(new TextEncoder().encode(input)); - process.stdin.close(); - const output = await process.output(); - const actual = decoder.decode(output).trim(); - - assertStrictEquals(actual, '.foo = "bar"'); - } finally { - process.close(); - } -}); - -function catj( - ...files: string[] -): Deno.Process { - return Deno.run({ - cmd: [Deno.execPath(), "run", "--allow-read", "catj.ts", ...files], - cwd: moduleDir, - stdin: "piped", - stdout: "piped", - env: { NO_COLOR: "true" }, - }); -} diff --git a/std/examples/tests/colors_test.ts b/std/examples/tests/colors_test.ts deleted file mode 100644 index 91d016232..000000000 --- a/std/examples/tests/colors_test.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { assertStrictEquals } from "../../testing/asserts.ts"; -import { resolve, dirname, fromFileUrl } from "../../path/mod.ts"; - -const moduleDir = resolve(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"], - cwd: moduleDir, - stdout: "piped", - }); - try { - const output = await process.output(); - const actual = decoder.decode(output).trim(); - const expected = "Hello world!"; - assertStrictEquals(actual, expected); - } finally { - process.close(); - } -}); diff --git a/std/examples/tests/curl_test.ts b/std/examples/tests/curl_test.ts deleted file mode 100644 index f35edab4c..000000000 --- a/std/examples/tests/curl_test.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { serve } from "../../http/server.ts"; -import { assertStrictEquals } from "../../testing/asserts.ts"; -import { resolve, dirname, fromFileUrl } from "../../path/mod.ts"; - -const moduleDir = resolve(dirname(fromFileUrl(import.meta.url)), ".."); - -Deno.test({ - name: "[examples/curl] send a request to a specified url", - fn: async () => { - const server = serve({ port: 8081 }); - const serverPromise = (async (): Promise => { - for await (const req of server) { - req.respond({ body: "Hello world" }); - } - })(); - - const decoder = new TextDecoder(); - const process = Deno.run({ - cmd: [ - Deno.execPath(), - "run", - "--allow-net", - "curl.ts", - "http://localhost:8081", - ], - cwd: moduleDir, - stdout: "piped", - }); - - try { - const output = await process.output(); - const actual = decoder.decode(output).trim(); - const expected = "Hello world"; - - assertStrictEquals(actual, expected); - } finally { - server.close(); - process.close(); - await serverPromise; - } - }, -}); diff --git a/std/examples/tests/echo_server_test.ts b/std/examples/tests/echo_server_test.ts deleted file mode 100644 index 6bfcbbc3d..000000000 --- a/std/examples/tests/echo_server_test.ts +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { assertStrictEquals, assertNotEquals } from "../../testing/asserts.ts"; -import { BufReader, ReadLineResult } from "../../io/bufio.ts"; -import { resolve, dirname, fromFileUrl } from "../../path/mod.ts"; - -const moduleDir = resolve(dirname(fromFileUrl(import.meta.url)), ".."); - -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"], - cwd: moduleDir, - stdout: "piped", - }); - - let conn: Deno.Conn | undefined; - try { - const processReader = new BufReader(process.stdout); - const message = await processReader.readLine(); - - assertNotEquals(message, null); - assertStrictEquals( - decoder.decode((message as ReadLineResult).line).trim(), - "Listening on 0.0.0.0:8080", - ); - - conn = await Deno.connect({ hostname: "127.0.0.1", port: 8080 }); - const connReader = new BufReader(conn); - - await conn.write(encoder.encode("Hello echo_server\n")); - const result = await connReader.readLine(); - - assertNotEquals(result, null); - - const actualResponse = decoder - .decode((result as ReadLineResult).line) - .trim(); - const expectedResponse = "Hello echo_server"; - - assertStrictEquals(actualResponse, expectedResponse); - } finally { - conn?.close(); - process.stdout.close(); - process.close(); - } -}); diff --git a/std/examples/tests/test_test.ts b/std/examples/tests/test_test.ts deleted file mode 100644 index 7c9527060..000000000 --- a/std/examples/tests/test_test.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import "../test.ts"; diff --git a/std/examples/tests/welcome_test.ts b/std/examples/tests/welcome_test.ts deleted file mode 100644 index 5f8d81988..000000000 --- a/std/examples/tests/welcome_test.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { assertStrictEquals } from "../../testing/asserts.ts"; -import { resolve, dirname, fromFileUrl } from "../../path/mod.ts"; - -const moduleDir = resolve(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"], - cwd: moduleDir, - stdout: "piped", - }); - try { - const output = await process.output(); - const actual = decoder.decode(output).trim(); - const expected = "Welcome to Deno 🦕"; - assertStrictEquals(actual, expected); - } finally { - process.close(); - } -}); diff --git a/std/examples/tests/xeval_test.ts b/std/examples/tests/xeval_test.ts deleted file mode 100644 index d3493d397..000000000 --- a/std/examples/tests/xeval_test.ts +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { xeval } from "../xeval.ts"; -import { StringReader } from "../../io/readers.ts"; -import { decode, encode } from "../../encoding/utf8.ts"; -import { - assertEquals, - assertStringContains, - assert, -} from "../../testing/asserts.ts"; -import { resolve, dirname, fromFileUrl } from "../../path/mod.ts"; - -const moduleDir = resolve(dirname(fromFileUrl(import.meta.url)), ".."); - -Deno.test("xevalSuccess", async function (): Promise { - const chunks: string[] = []; - await xeval(new StringReader("a\nb\nc"), ($): number => chunks.push($)); - assertEquals(chunks, ["a", "b", "c"]); -}); - -Deno.test("xevalDelimiter", async function (): Promise { - const chunks: string[] = []; - await xeval( - new StringReader("!MADMADAMADAM!"), - ($): number => chunks.push($), - { - delimiter: "MADAM", - }, - ); - assertEquals(chunks, ["!MAD", "ADAM!"]); -}); - -const xevalPath = "xeval.ts"; - -Deno.test({ - name: "xevalCliReplvar", - fn: async function (): Promise { - const p = Deno.run({ - cmd: [ - Deno.execPath(), - "run", - xevalPath, - "--replvar=abc", - "console.log(abc)", - ], - cwd: moduleDir, - stdin: "piped", - stdout: "piped", - stderr: "null", - }); - assert(p.stdin != null); - await p.stdin.write(encode("hello")); - p.stdin.close(); - assertEquals(await p.status(), { code: 0, success: true }); - assertEquals(decode(await p.output()).trimEnd(), "hello"); - p.close(); - }, -}); - -Deno.test("xevalCliSyntaxError", async function (): Promise { - const p = Deno.run({ - cmd: [Deno.execPath(), "run", xevalPath, "("], - cwd: moduleDir, - stdin: "null", - stdout: "piped", - stderr: "piped", - }); - assertEquals(await p.status(), { code: 1, success: false }); - assertEquals(decode(await p.output()), ""); - assertStringContains(decode(await p.stderrOutput()), "Uncaught SyntaxError"); - p.close(); -}); diff --git a/std/examples/welcome_test.ts b/std/examples/welcome_test.ts new file mode 100644 index 000000000..626527bca --- /dev/null +++ b/std/examples/welcome_test.ts @@ -0,0 +1,22 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. +import { assertStrictEquals } from "../testing/asserts.ts"; +import { dirname, fromFileUrl } from "../path/mod.ts"; + +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"], + cwd: moduleDir, + stdout: "piped", + }); + try { + const output = await process.output(); + const actual = decoder.decode(output).trim(); + const expected = "Welcome to Deno 🦕"; + assertStrictEquals(actual, expected); + } finally { + process.close(); + } +}); diff --git a/std/examples/xeval_test.ts b/std/examples/xeval_test.ts new file mode 100644 index 000000000..93e664dde --- /dev/null +++ b/std/examples/xeval_test.ts @@ -0,0 +1,71 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. +import { xeval } from "./xeval.ts"; +import { StringReader } from "../io/readers.ts"; +import { decode, encode } from "../encoding/utf8.ts"; +import { + assertEquals, + assertStringContains, + assert, +} from "../testing/asserts.ts"; +import { dirname, fromFileUrl } from "../path/mod.ts"; + +const moduleDir = dirname(fromFileUrl(import.meta.url)); + +Deno.test("xevalSuccess", async function (): Promise { + const chunks: string[] = []; + await xeval(new StringReader("a\nb\nc"), ($): number => chunks.push($)); + assertEquals(chunks, ["a", "b", "c"]); +}); + +Deno.test("xevalDelimiter", async function (): Promise { + const chunks: string[] = []; + await xeval( + new StringReader("!MADMADAMADAM!"), + ($): number => chunks.push($), + { + delimiter: "MADAM", + }, + ); + assertEquals(chunks, ["!MAD", "ADAM!"]); +}); + +const xevalPath = "xeval.ts"; + +Deno.test({ + name: "xevalCliReplvar", + fn: async function (): Promise { + const p = Deno.run({ + cmd: [ + Deno.execPath(), + "run", + xevalPath, + "--replvar=abc", + "console.log(abc)", + ], + cwd: moduleDir, + stdin: "piped", + stdout: "piped", + stderr: "null", + }); + assert(p.stdin != null); + await p.stdin.write(encode("hello")); + p.stdin.close(); + assertEquals(await p.status(), { code: 0, success: true }); + assertEquals(decode(await p.output()).trimEnd(), "hello"); + p.close(); + }, +}); + +Deno.test("xevalCliSyntaxError", async function (): Promise { + const p = Deno.run({ + cmd: [Deno.execPath(), "run", xevalPath, "("], + cwd: moduleDir, + stdin: "null", + stdout: "piped", + stderr: "piped", + }); + assertEquals(await p.status(), { code: 1, success: false }); + assertEquals(decode(await p.output()), ""); + assertStringContains(decode(await p.stderrOutput()), "Uncaught SyntaxError"); + p.close(); +}); -- cgit v1.2.3