UNPKG

flagpole

Version:

Simple and fast DOM integration, headless or headful browser, and REST API testing framework.

42 lines (41 loc) 1.49 kB
import { AssertionContext } from './assertioncontext'; export declare class Assertion { readonly and: Assertion; readonly type: Assertion; readonly length: Assertion; readonly not: Assertion; readonly optional: Assertion; readonly resolvesTo: Promise<any>; private _context; private _input; private _message; private _not; private _optional; private _result; static create(context: AssertionContext, thisValue: any, message?: string): Promise<Assertion>; constructor(context: AssertionContext, thisValue: any, message?: string | null); exactly(value: any): Assertion; equals(value: any): Assertion; like(value: any): Assertion; greaterThan(value: any): Assertion; greaterThanOrEquals(value: any): Assertion; lessThan(value: any): Assertion; lessThanOrEquals(value: any): Assertion; between(min: any, max: any): Assertion; matches(value: any): Assertion; contains(value: any): Assertion; startsWith(value: any): Assertion; endsWith(value: any): Assertion; in(values: any[]): Assertion; includes(value: any): Assertion; exists(): Assertion; resolves(continueOnReject?: boolean): Promise<Assertion>; rejects(continueOnReject?: boolean): Promise<any>; none(callback: Function): Assertion; every(callback: Function): Assertion; some(callback: Function): Assertion; private _assert; private _getCompareValue; private _getSubject; private _eval; }