flagpole
Version:
Simple and fast DOM integration, headless or headful browser, and REST API testing framework.
36 lines (35 loc) • 1.7 kB
TypeScript
import { AssertionPromise } from "./assertion/assertion-promise";
import { iAssertionIs } from "./interfaces/iassertion-is";
import { iAssertion } from "./interfaces/iassertion";
import { iValue } from "./interfaces/ivalue";
export declare class ValuePromise<T extends iValue = iValue> extends Promise<T> implements PromiseLike<T> {
static execute<T extends iValue<any>>(callback: () => Promise<T>): ValuePromise<T>;
static wrap<T extends iValue<any>>(value: T | Promise<T>): ValuePromise<T>;
private constructor();
get is(): Promise<iAssertionIs>;
get not(): Promise<iAssertion>;
equals(value: any): AssertionPromise;
exactly(value: any): AssertionPromise;
like(value: any): AssertionPromise;
contains(value: any): AssertionPromise;
greaterThan(value: any): AssertionPromise;
lessThan(value: any): AssertionPromise;
greaterThanOrEquals(value: any): AssertionPromise;
lessThanOrEquals(value: any): AssertionPromise;
between(min: any, max: any): AssertionPromise;
matches(value: any): AssertionPromise;
startsWith(value: any): AssertionPromise;
endsWith(value: any): AssertionPromise;
includes(value: any): AssertionPromise;
rename: (newName: string) => ValuePromise<iValue<any>>;
clear: () => ValuePromise<iValue<any>>;
clearThenType: (text: string, opts?: any) => ValuePromise<iValue<any>>;
type: (text: string, opts?: any) => ValuePromise<iValue<any>>;
assert: (message: string) => AssertionPromise;
exists: () => Promise<iValue<boolean>>;
private _promisifyAssertMethod;
private _promisifyAssertProperty;
private _promisifyMethod;
private _promisifyProperty;
private toValuePromise;
}