/** * E2E Test Runner - Matcher Implementations * * Each matcher function returns { pass: boolean, message: string } * where message describes the assertion failure if pass is false. */ /** * Result of a matcher evaluation */ export interface MatcherResult { pass: boolean; message: string; } /** * A matcher function that compares actual value against expected */ export type MatcherFunction = (actual: unknown, expected?: T) => MatcherResult; /** * Format a value for display in error messages */ export declare function formatValue(value: unknown, maxLength?: number): string; /** * Get the type name of a value */ export declare function getTypeName(value: unknown): string; /** * Deep equality comparison */ export declare function deepEqual(a: unknown, b: unknown): boolean; /** * Strict equality matcher (===) */ export declare function toBe(actual: unknown, expected: unknown): MatcherResult; /** * Deep equality matcher */ export declare function toEqual(actual: unknown, expected: unknown): MatcherResult; /** * Check if actual is one of the expected values */ export declare function toBeOneOf(actual: unknown, expected: unknown[]): MatcherResult; /** * Check if value is defined (not undefined) */ export declare function toBeDefined(actual: unknown): MatcherResult; /** * Check if value is undefined */ export declare function toBeUndefined(actual: unknown): MatcherResult; /** * Check if value is null */ export declare function toBeNull(actual: unknown): MatcherResult; /** * Check if value is not null */ export declare function toBeNotNull(actual: unknown): MatcherResult; /** * Check if value is truthy */ export declare function toBeTruthy(actual: unknown): MatcherResult; /** * Check if value is falsy */ export declare function toBeFalsy(actual: unknown): MatcherResult; /** * Check if array/string contains an item */ export declare function toContain(actual: unknown, item: unknown): MatcherResult; /** * Check if array/string/object has specific length */ export declare function toHaveLength(actual: unknown, length: number): MatcherResult; /** * Check if string matches a pattern */ export declare function toMatch(actual: unknown, pattern: RegExp | string): MatcherResult; /** * Check if actual is greater than value */ export declare function toBeGreaterThan(actual: unknown, value: number): MatcherResult; /** * Check if actual is greater than or equal to value */ export declare function toBeGreaterThanOrEqual(actual: unknown, value: number): MatcherResult; /** * Check if actual is less than value */ export declare function toBeLessThan(actual: unknown, value: number): MatcherResult; /** * Check if actual is less than or equal to value */ export declare function toBeLessThanOrEqual(actual: unknown, value: number): MatcherResult; /** * Check if object has a property, optionally with a specific value */ export declare function toHaveProperty(actual: unknown, path: string, expectedValue?: unknown): MatcherResult; /** * Check if value is of a specific type */ export declare function toBeType(actual: unknown, expectedType: string): MatcherResult; /** * Registry of all available matchers */ export declare const matchers: { readonly toBe: typeof toBe; readonly toEqual: typeof toEqual; readonly toBeOneOf: typeof toBeOneOf; readonly toBeDefined: typeof toBeDefined; readonly toBeUndefined: typeof toBeUndefined; readonly toBeNull: typeof toBeNull; readonly toBeNotNull: typeof toBeNotNull; readonly toBeTruthy: typeof toBeTruthy; readonly toBeFalsy: typeof toBeFalsy; readonly toContain: typeof toContain; readonly toHaveLength: typeof toHaveLength; readonly toMatch: typeof toMatch; readonly toBeGreaterThan: typeof toBeGreaterThan; readonly toBeGreaterThanOrEqual: typeof toBeGreaterThanOrEqual; readonly toBeLessThan: typeof toBeLessThan; readonly toBeLessThanOrEqual: typeof toBeLessThanOrEqual; readonly toHaveProperty: typeof toHaveProperty; readonly toBeType: typeof toBeType; }; export type MatcherName = keyof typeof matchers; //# sourceMappingURL=matchers.d.ts.map