BREAKING: remove overload of Deno.test() (#4951)

This commit removes overload of Deno.test() that accepted named
function.
This commit is contained in:
Bartek Iwańczuk 2020-04-28 12:33:09 +02:00 committed by GitHub
parent b508e84567
commit 8feb30e325
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
69 changed files with 446 additions and 471 deletions

View file

@ -57,24 +57,6 @@ declare namespace Deno {
*/
export function test(t: TestDefinition): void;
/** Register a test which will be run when `deno test` is used on the command
* line and the containing module looks like a test module.
* `fn` can be async if required.
*
* import {assert, fail, assertEquals} from "https://deno.land/std/testing/asserts.ts";
*
* Deno.test(function myTestFunction():void {
* assertEquals("hello", "hello");
* });
*
* Deno.test(async function myAsyncTestFunction():Promise<void> {
* const decoder = new TextDecoder("utf-8");
* const data = await Deno.readFile("hello_world.txt");
* assertEquals(decoder.decode(data), "Hello world")
* });
**/
export function test(fn: () => void | Promise<void>): void;
/** Register a test which will be run when `deno test` is used on the command
* line and the containing module looks like a test module.
* `fn` can be async if required.