1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00
denoland-deno/cli/tests
Bartek Iwańczuk d8afd56838
feat(test): Add more overloads for "Deno.test" (#12749)
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;
```
2021-11-23 14:57:51 +01:00
..
integration feat(test): Add more overloads for "Deno.test" (#12749) 2021-11-23 14:57:51 +01:00
testdata feat(test): Add more overloads for "Deno.test" (#12749) 2021-11-23 14:57:51 +01:00
unit feat(test): Add more overloads for "Deno.test" (#12749) 2021-11-23 14:57:51 +01:00
integration_tests.rs chore: split up integration_tests.rs into separate files (#11131) 2021-06-27 13:27:36 -04:00