Skip to content

Latest commit

 

History

History
103 lines (76 loc) · 2.57 KB

File metadata and controls

103 lines (76 loc) · 2.57 KB

API Report File for "@cucumber/node"

Do not edit this file. It is a report generated by API Extractor.

import { DataTable } from '@cucumber/core';
import type { Readable } from 'node:stream';
import type { TestContext } from 'node:test';

// @public
export function After(fn: HookFunction): void;

// @public
export function After(options: HookOptions, fn: HookFunction): void;

// @public
export type AttachFunction = (data: Readable | Buffer | string, options: AttachmentOptions) => Promise<void>;

// @public
export type AttachmentOptions = {
    mediaType: string;
    fileName?: string;
};

// @public
export type AttachmentsSupport = {
    attach: AttachFunction;
    log: LogFunction;
    link: LinkFunction;
};

// @public
export function Before(fn: HookFunction): void;

// @public
export function Before(options: HookOptions, fn: HookFunction): void;

export { DataTable }

// @public
export function Given(pattern: string | RegExp, fn: StepFunction): void;

// @public
export type HookFunction = (this: World, context: TestCaseContext) => any | PromiseLike<any>;

// @public
export type HookOptions = {
    name?: string;
    tags?: string;
};

// @public
export type LinkFunction = (url: string, title?: string) => Promise<void>;

// @public
export type LogFunction = (text: string) => Promise<void>;

// @public
export function ParameterType(options: ParameterTypeOptions): void;

// @public
export type ParameterTypeOptions = {
    name: string;
    regexp: RegExp | string | readonly RegExp[] | readonly string[];
    transformer?: TransformerFunction;
    useForSnippets?: boolean;
    preferForRegexpMatch?: boolean;
};

// @public
export type StepFunction = (this: World, context: TestCaseContext, ...args: any) => any | PromiseLike<any>;

// @public
export type TestCaseContext = {
    assert: TestContext['assert'];
    mock: TestContext['mock'];
    skip(): void;
    todo(): void;
    attach: AttachFunction;
    log: LogFunction;
    link: LinkFunction;
    world: World;
};

// @public
export function Then(pattern: string | RegExp, fn: StepFunction): void;

// @public
export type TransformerFunction = (this: World, context: TestCaseContext, ...match: string[]) => unknown | PromiseLike<unknown>;

// @public
export function When(pattern: string | RegExp, fn: StepFunction): void;

// @public
export type World = any;

// @public
export function WorldCreator(creator: (attachmentsSupport: AttachmentsSupport) => World | PromiseLike<World>, destroyer?: (world: World) => void | PromiseLike<void>): void;

// (No @packageDocumentation comment for this package)