/** * Acceptance test tool. * @packageDocumentation */ import { isPendingError } from './PendingError'; import { ActionFunction, StepDefName } from './types'; export { isPendingError } from './PendingError'; export { StepName } from './StepName'; export { ActionFunction, ActionWrapper, IConfig, IStep, ITestExecutionContext, ITestReporter, StepDefName, Thenable } from './types'; /** * Creates a Test. * @public */ export declare function test(name: string, f: () => X): X; /** * Creates a Test. * @public */ export declare function test(nameParts: TemplateStringsArray, ...substitutions: any[]): (f: () => X) => X; /** * Creates a Compound Test Step, which can contain child steps. * @public */ export declare function to(name: string, f: () => X): X; /** * Creates a Compound Test Step, which can contain child steps. * @public */ export declare function to(nameParts: TemplateStringsArray, ...substitutions: any[]): (f?: () => X) => X; /** * Creates an Action Step to be performed at runtime. * @public */ export declare function action(name: string, f: ActionFunction): void; /** * Creates an Action Step to be performed at runtime. * @public */ export declare function action(nameParts: TemplateStringsArray, ...substitutions: any[]): (f?: ActionFunction) => void; /** * Deprecated: Makes the enclosing `step()` an Action Step. * @public * @deprecated Use `action(name, f)` or `action` template tag instead. */ export declare function action(f: ActionFunction): void; /** * Creates a Deferred Action Step, for, e.g., cleaning up resources. * @public */ export declare function defer(name: string, f: ActionFunction): void; /** * Creates a Deferred Action Step, for, e.g., cleaning up resources. * @public */ export declare function defer(nameParts: TemplateStringsArray, ...substitutions: any[]): (f?: ActionFunction) => void; /** * Creates a Pending step to make the test end with pending state. * Useful for unfinished tests. * @public */ export declare function pending(): void; /** * Marks the steps inside as independent * @public */ export declare function independent(f: () => X): X; /** * Deprecated. * @public * @deprecated Use `to()` instead. */ export declare function step(name: StepDefName, f: () => X): X; /** * Deprecated. * @public * @deprecated Use `defer()` instead. */ export declare function cleanup(name: StepDefName, f: () => X): X; /** * Deprecated. * @public * @deprecated Use `defer()` instead. */ export declare function onFinish(f: () => void): void; /** * Returns the current state object. * This allows library functions to hook into prescript’s state. * @public */ export declare function getCurrentState(): Prescript.GlobalState; /** * Returns the current action context object. * This allows library functions to hook into prescript’s current action context. * @public */ export declare function getCurrentContext(): import("./types").ITestExecutionContext; /** * Returns a state object that exists only during prescription phase for each test. * @public */ export declare function getCurrentPrescriptionState(): Prescript.PrescriptionState; declare const _default: { test: typeof test; to: typeof to; action: typeof action; defer: typeof defer; pending: typeof pending; step: typeof step; cleanup: typeof cleanup; onFinish: typeof onFinish; getCurrentState: typeof getCurrentState; getCurrentContext: typeof getCurrentContext; getCurrentPrescriptionState: typeof getCurrentPrescriptionState; isPendingError: typeof isPendingError; }; export default _default; //# sourceMappingURL=singletonApi.d.ts.map