summaryrefslogtreecommitdiff
path: root/std/examples
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-04-28 12:33:09 +0200
committerGitHub <noreply@github.com>2020-04-28 12:33:09 +0200
commit8feb30e3258ed9690eb850e3ca22842b260a0403 (patch)
tree6805bfe3df675c2c7f6a379093061c6b73d8365a /std/examples
parentb508e845671de9351c3f51755647371d76128d29 (diff)
BREAKING: remove overload of Deno.test() (#4951)
This commit removes overload of Deno.test() that accepted named function.
Diffstat (limited to 'std/examples')
-rw-r--r--std/examples/test.ts6
-rw-r--r--std/examples/tests/xeval_test.ts6
2 files changed, 6 insertions, 6 deletions
diff --git a/std/examples/test.ts b/std/examples/test.ts
index 6e26407fb..acda9293d 100644
--- a/std/examples/test.ts
+++ b/std/examples/test.ts
@@ -3,16 +3,16 @@ const { run } = Deno;
import { assertEquals } from "../testing/asserts.ts";
/** Example of how to do basic tests */
-Deno.test(function t1(): void {
+Deno.test("t1", function (): void {
assertEquals("hello", "hello");
});
-Deno.test(function t2(): void {
+Deno.test("t2", function (): void {
assertEquals("world", "world");
});
/** A more complicated test that runs a subprocess. */
-Deno.test(async function catSmoke(): Promise<void> {
+Deno.test("catSmoke", async function (): Promise<void> {
const p = run({
cmd: [
Deno.execPath(),
diff --git a/std/examples/tests/xeval_test.ts b/std/examples/tests/xeval_test.ts
index 38deda686..426f6fe56 100644
--- a/std/examples/tests/xeval_test.ts
+++ b/std/examples/tests/xeval_test.ts
@@ -9,13 +9,13 @@ import {
} from "../../testing/asserts.ts";
const { execPath, run } = Deno;
-Deno.test(async function xevalSuccess(): Promise<void> {
+Deno.test("xevalSuccess", async function (): Promise<void> {
const chunks: string[] = [];
await xeval(stringsReader("a\nb\nc"), ($): number => chunks.push($));
assertEquals(chunks, ["a", "b", "c"]);
});
-Deno.test(async function xevalDelimiter(): Promise<void> {
+Deno.test("xevalDelimiter", async function (): Promise<void> {
const chunks: string[] = [];
await xeval(stringsReader("!MADMADAMADAM!"), ($): number => chunks.push($), {
delimiter: "MADAM",
@@ -43,7 +43,7 @@ Deno.test({
},
});
-Deno.test(async function xevalCliSyntaxError(): Promise<void> {
+Deno.test("xevalCliSyntaxError", async function (): Promise<void> {
const p = run({
cmd: [execPath(), xevalPath, "("],
stdin: "null",