diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-04-28 12:33:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-28 12:33:09 +0200 |
commit | 8feb30e3258ed9690eb850e3ca22842b260a0403 (patch) | |
tree | 6805bfe3df675c2c7f6a379093061c6b73d8365a /std/testing/README.md | |
parent | b508e845671de9351c3f51755647371d76128d29 (diff) |
BREAKING: remove overload of Deno.test() (#4951)
This commit removes overload of Deno.test() that accepted named
function.
Diffstat (limited to 'std/testing/README.md')
-rw-r--r-- | std/testing/README.md | 14 |
1 files changed, 7 insertions, 7 deletions
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<void> { +Deno.test("doesThrow", async function (): Promise<void> { await assertThrowsAsync( async (): Promise<void> => { throw new TypeError("hello world!"); @@ -128,7 +128,7 @@ Deno.test(async function doesThrow(): Promise<void> { }); // This test will not pass -Deno.test(async function fails(): Promise<void> { +Deno.test("fails", async function (): Promise<void> { await assertThrowsAsync( async (): Promise<void> => { console.log("Hello world"); |