From 8feb30e3258ed9690eb850e3ca22842b260a0403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 28 Apr 2020 12:33:09 +0200 Subject: BREAKING: remove overload of Deno.test() (#4951) This commit removes overload of Deno.test() that accepted named function. --- std/testing/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'std/testing/README.md') diff --git a/std/testing/README.md b/std/testing/README.md index 711aa0257..66d80d4bc 100644 --- a/std/testing/README.md +++ b/std/testing/README.md @@ -51,7 +51,7 @@ Deno.test({ Short syntax (named function instead of object): ```ts -Deno.test(function example(): void { +Deno.test("example", function (): void { assertEquals("world", "world"); assertEquals({ hello: "world" }, { hello: "world" }); }); @@ -60,14 +60,14 @@ Deno.test(function example(): void { Using `assertStrictEq()`: ```ts -Deno.test(function isStrictlyEqual(): void { +Deno.test("isStrictlyEqual", function (): void { const a = {}; const b = a; assertStrictEq(a, b); }); // This test fails -Deno.test(function isNotStrictlyEqual(): void { +Deno.test("isNotStrictlyEqual", function (): void { const a = {}; const b = {}; assertStrictEq(a, b); @@ -77,7 +77,7 @@ Deno.test(function isNotStrictlyEqual(): void { Using `assertThrows()`: ```ts -Deno.test(function doesThrow(): void { +Deno.test("doesThrow", function (): void { assertThrows((): void => { throw new TypeError("hello world!"); }); @@ -94,7 +94,7 @@ Deno.test(function doesThrow(): void { }); // This test will not pass -Deno.test(function fails(): void { +Deno.test("fails", function (): void { assertThrows((): void => { console.log("Hello world"); }); @@ -104,7 +104,7 @@ Deno.test(function fails(): void { Using `assertThrowsAsync()`: ```ts -Deno.test(async function doesThrow(): Promise { +Deno.test("doesThrow", async function (): Promise { await assertThrowsAsync( async (): Promise => { throw new TypeError("hello world!"); @@ -128,7 +128,7 @@ Deno.test(async function doesThrow(): Promise { }); // This test will not pass -Deno.test(async function fails(): Promise { +Deno.test("fails", async function (): Promise { await assertThrowsAsync( async (): Promise => { console.log("Hello world"); -- cgit v1.2.3