mirror of
https://github.com/denoland/deno.git
synced 2025-07-23 13:15:16 +00:00
BREAKING: remove overload of Deno.test() (#4951)
This commit removes overload of Deno.test() that accepted named function.
This commit is contained in:
parent
b508e84567
commit
8feb30e325
69 changed files with 446 additions and 471 deletions
18
cli/js/lib.deno.ns.d.ts
vendored
18
cli/js/lib.deno.ns.d.ts
vendored
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue