import Node from "node:test"; import type { Closure } from "../closure/mod.ts"; export interface Context { readonly name: string; test(name: string, closure: Closure): Promise; } export declare namespace Context { function test(name: string, closure: Closure): void; class Standalone implements Context { readonly name: string; constructor(name: string); static test(name: string, closure: Closure): void; test(name: string, closure: Closure): Promise; } class DenoContext implements Context { readonly inner: Deno.TestContext; constructor(inner: Deno.TestContext); static test(name: string, closure: Closure): void; get name(): string; /** * Run a test block * @param message message to show * @param closure closure to run * @returns result of closure */ test(name: string, closure: Closure): Promise; } class NodeContext implements Context { readonly inner: Node.TestContext; constructor(inner: Node.TestContext); static test(name: string, closure: Closure): void; get name(): string; test(name: string, closure: Closure): Promise; } }