flagpole
Version:
Simple and fast DOM integration, headless or headful browser, and REST API testing framework.
17 lines (16 loc) • 1.1 kB
TypeScript
import { iAssertionContext } from "./interfaces/iassertioncontext";
import { FindAllOptions, FindOptions } from "./interfaces/find-options";
import { Value } from "./value";
import { iResponse, iValue } from ".";
export declare function wrapAsValue<T>(context: iAssertionContext, data: T, name: string, source?: any): Value<T>;
export declare function findOne(scope: iValue<any> | iResponse, selector: string, params: FindParams): Promise<iValue<any>>;
export declare type FindParams = {
contains: string | null;
matches: RegExp | null;
opts: FindOptions | FindAllOptions | null;
};
export declare function getFindName(params: FindParams, selector: string | string[], i: number | null): string;
export declare function getFindParams(a: any, b: any): FindParams;
export declare function filterFind<T = any>(elements: iValue<T>[], contains?: string | RegExp | null, opts?: FindAllOptions | null): Promise<iValue<T>[]>;
export declare function applyOffsetAndLimit(opts: FindAllOptions, elements: iValue<any>[]): iValue<any>[];
export declare const delay: (ms: number) => Promise<unknown>;