Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Deno.TestContext

interface TestContext {
name: string;
origin: string;
parent?: TestContext;
step(t: TestStepDefinition): Promise<boolean>;
step(name: string, fn: (t: TestContext) => void | Promise<void>): Promise<boolean>;
}

§Properties

§
name: string
[src]

The current test name.

§
origin: string
[src]

File Uri of the current test code.

§

Parent test context.

§Methods

§
step(t: TestStepDefinition): Promise<boolean>
[src]

Run a sub step of the parent test or step. Returns a promise that resolves to a boolean signifying if the step completed successfully. The returned promise never rejects unless the arguments are invalid. If the test was ignored the promise returns false.

§
step(name: string, fn: (t: TestContext) => void | Promise<void>): Promise<boolean>
[src]

Run a sub step of the parent test or step. Returns a promise that resolves to a boolean signifying if the step completed successfully. The returned promise never rejects unless the arguments are invalid. If the test was ignored the promise returns false.