summaryrefslogtreecommitdiff
path: root/cli/dts/lib.deno.ns.d.ts
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2021-10-11 09:45:02 -0400
committerGitHub <noreply@github.com>2021-10-11 09:45:02 -0400
commit426ebf854a82c63cdaa2413fbd1b005025dba95b (patch)
tree316a426e280db29745444e7606952c8c235c846a /cli/dts/lib.deno.ns.d.ts
parent668b400ff2fa5634f575e54f40ab1f0b78fcdf16 (diff)
feat(unstable/test): imperative test steps API (#12190)
Diffstat (limited to 'cli/dts/lib.deno.ns.d.ts')
-rw-r--r--cli/dts/lib.deno.ns.d.ts12
1 files changed, 9 insertions, 3 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts
index 4d3dfe0d3..eb91d6fa4 100644
--- a/cli/dts/lib.deno.ns.d.ts
+++ b/cli/dts/lib.deno.ns.d.ts
@@ -113,8 +113,12 @@ declare namespace Deno {
* See: https://no-color.org/ */
export const noColor: boolean;
+ /** **UNSTABLE**: New option, yet to be vetted. */
+ export interface TestContext {
+ }
+
export interface TestDefinition {
- fn: () => void | Promise<void>;
+ fn: (t: TestContext) => void | Promise<void>;
name: string;
ignore?: boolean;
/** If at least one test has `only` set to true, only run tests that have
@@ -127,7 +131,6 @@ declare namespace Deno {
* after the test has exactly the same contents as before the test. Defaults
* to true. */
sanitizeResources?: boolean;
-
/** Ensure the test case does not prematurely cause the process to exit,
* for example via a call to `Deno.exit`. Defaults to true. */
sanitizeExit?: boolean;
@@ -184,7 +187,10 @@ declare namespace Deno {
* });
* ```
*/
- export function test(name: string, fn: () => void | Promise<void>): void;
+ export function test(
+ name: string,
+ fn: (t: TestContext) => void | Promise<void>,
+ ): void;
/** Exit the Deno process with optional exit code. If no exit code is supplied
* then Deno will exit with return code of 0.