import { AssertPredicate, AssertionError } from 'node:assert'; import { ChildProcess, ChildProcessWithoutNullStreams } from 'node:child_process'; type Code = 0 | 1; type Configs$1 = { filter?: RegExp; exclude?: RegExp | RegExp[]; }; type ProcessAssertionOptions = { message?: string | Error; defaultMessage?: string; actual?: string; expected?: string; throw?: boolean; hideDiff?: boolean; }; type AssertionMessage = ProcessAssertionOptions['message']; type AssertValue = (value: unknown, message?: AssertionMessage) => void; type AssertEqual = (actual: unknown, expected: unknown, message?: AssertionMessage) => void; type AssertMatch = (value: string, regExp: RegExp, message?: AssertionMessage) => void; type AsyncBlock = (() => Promise) | Promise; type AssertThrows = { (block: () => unknown, message?: AssertionMessage): void; (block: () => unknown, error: AssertPredicate, message?: AssertionMessage): void; }; type AssertRejects = { (block: AsyncBlock, message?: AssertionMessage): Promise; (block: AsyncBlock, error: AssertPredicate, message?: AssertionMessage): Promise; }; declare const backgroundColor: { readonly white: 7; readonly black: 40; readonly grey: 100; readonly red: 41; readonly green: 42; readonly yellow: 43; readonly blue: 44; readonly magenta: 45; readonly cyan: 46; readonly brightRed: 101; readonly brightGreen: 102; readonly brightYellow: 103; readonly brightBlue: 104; readonly brightMagenta: 105; readonly brightCyan: 106; }; type DescribeOptions = { background?: keyof typeof backgroundColor | boolean; icon?: string; }; type Describe = { (message: string, cb: AsyncTestCb): Promise; (message: string, cb: TestCb): void; (cb: AsyncTestCb): Promise; (cb: TestCb): void; (message: string, options?: DescribeOptions): void; }; declare const timespan: Timespan; declare const VERSION = "0.0.0-placeholder"; declare const results: { passed: number; failed: number; skipped: number; todo: number; }; type PluginContext = { readonly configs: Configs; readonly runtime: Runtime; readonly cwd: string; readonly configFile: string | undefined; readonly runAsOnly: boolean; readonly results: typeof results; readonly timespan: typeof timespan; readonly reporter: ReturnType; }; type PokuPlugin = { name?: string; runner?: (command: string[], file: string) => string[]; setup?: (context: PluginContext) => void | Promise; teardown?: (context: PluginContext) => void | Promise; ipc?: boolean; onTestProcess?: (child: ChildProcess, file: string) => void; discoverFiles?: (paths: string[], context: PluginContext) => string[] | Promise; }; type Results = { code: number; timespan: Timespan; results: typeof results; }; type Path = { absolute: string; relative: string; }; type ReporterPlugin = (configs?: Configs) => { onRunStart: () => void; onDescribeAsTitle: (title: string, options?: DescribeOptions) => void; onDescribeStart: (options: { title?: string; }) => void; onDescribeEnd: (options: { duration: number; success?: boolean; title?: string; }) => void; onItStart: (options: { title?: string; }) => void; onItEnd: (options: { duration: number; success?: boolean; title?: string; }) => void; onAssertionSuccess: (options: { message: string; }) => void; onAssertionFailure: (options: { assertOptions: ProcessAssertionOptions; error: AssertionError; }) => void; onSkipFile: (options: { message: string; }) => void; onSkipModifier: (options: { message: string; }) => void; onTodoModifier: (options: { message: string; }) => void; onRetryStart: (options: { attempt: number; total: number; }) => void; onRetryEnd: (options: { attempt: number; total: number; success: boolean; }) => void; onFileStart: (options: { path: Path; }) => void; onFileResult: (options: { status: boolean; path: Path; duration: number; output?: string; }) => void; onRunResult: (options: Results) => void; onExit: (options: Results) => void; }; type ReporterEvents = Partial>; type InspectCLIResult = { stdout: string; stderr: string; exitCode: number; process: ChildProcessWithoutNullStreams; PID: number; kill: () => Promise; }; type ScopeHook = { createHolder: () => { scope: unknown; }; runScoped: (holder: { scope: unknown; }, fn: (params?: Record) => Promise | unknown) => Promise; }; type CustomString = string & NonNullable; type DenoOptions = { allow?: string[]; deny?: string[]; }; type Runtime = 'node' | 'bun' | 'deno'; type Reporter = 'poku' | 'focus' | 'dot' | 'compact' | 'classic' | ReporterPlugin | CustomString; type Configs = { sequential?: boolean; failFast?: boolean; concurrency?: number; timeout?: number; reporter?: Reporter; beforeEach?: () => unknown | Promise; afterEach?: () => unknown | Promise; deno?: DenoOptions; plugins?: PokuPlugin[]; testNamePattern?: RegExp; testSkipPattern?: RegExp; isolation?: 'none' | 'process' | CustomString; debug?: boolean; quiet?: boolean; noExit?: boolean; } & Configs$1; type Timespan = { started: Date; finished: Date; duration: number; }; type CliConfigs = { include?: string | string[]; envFile?: string; kill?: { port?: [number]; range?: [number, number][]; pid?: [number]; }; }; type ConfigFile = Omit & CliConfigs; type Poku = { (targetPaths: string | string[], configs: Configs & { noExit: true; }): Promise; (targetPaths: string | string[], configs?: Configs): Promise; }; type TestCb = (params?: Record) => unknown | Promise; type AsyncTestCb = (params?: Record) => Promise; declare const onSigint: () => void; declare const poku: Poku; export { VERSION, onSigint, poku }; export type { AssertEqual, AssertMatch, AssertRejects, AssertThrows, AssertValue, AssertionMessage, AsyncTestCb, Code, ConfigFile, Configs$1 as Configs, Configs as Configs$1, Describe, InspectCLIResult, PluginContext, PokuPlugin, ReporterEvents, ReporterPlugin, ScopeHook, TestCb };