UNPKG

743 BTypeScriptView Raw
1import { Inspector } from './inspector';
2export declare abstract class Assertion<InspectorClass extends Inspector> {
3 abstract readonly description: string;
4 abstract assertUsing(inspector: InspectorClass): boolean;
5 /**
6 * Assert this thing and another thing
7 */
8 and(assertion: Assertion<InspectorClass>): Assertion<InspectorClass>;
9 assertOrThrow(inspector: InspectorClass): void;
10}
11export declare abstract class JestFriendlyAssertion<InspectorClass extends Inspector> extends Assertion<InspectorClass> {
12 /**
13 * Generates an error message that can be used by Jest.
14 */
15 abstract generateErrorMessage(): string;
16}
17export declare function not<T extends Inspector>(assertion: Assertion<T>): Assertion<T>;