mirror of
https://github.com/denoland/deno.git
synced 2024-11-29 16:30:56 -05:00
d8afd56838
This commit adds 4 more overloads to "Deno.test()" API. ``` // Deno.test(function testName() { }); export function test(fn: (t: TestContext) => void | Promise<void>): void; // Deno.test("test name", { only: true }, function() { }); export function test( name: string, options: Omit<TestDefinition, "name">, fn: (t: TestContext) => void | Promise<void>, ): void; // Deno.test({ name: "test name" }, function() { }); export function test( options: Omit<TestDefinition, "fn">, fn: (t: TestContext) => void | Promise<void>, ): void; // Deno.test({ only: true }, function testName() { }); export function test( options: Omit<TestDefinition, "fn" | "name">, fn: (t: TestContext) => void | Promise<void>, ): void; ```
6 lines
251 B
TypeScript
6 lines
251 B
TypeScript
Deno.test("test0", () => {});
|
|
Deno.test(function test1() {});
|
|
Deno.test({ name: "test2", fn: () => {} });
|
|
Deno.test("test3", { permissions: "none" }, () => {});
|
|
Deno.test({ name: "test4" }, () => {});
|
|
Deno.test({ ignore: true }, function test5() {});
|