@testing-library/react-native
Version:
Simple and complete React Native testing utilities that encourage good testing practices.
23 lines (22 loc) • 757 B
TypeScript
import type { TestInstance } from 'test-renderer';
import type { Size } from '../../types';
import type { UserEventInstance } from '../setup';
interface CommonScrollToOptions {
contentSize?: Size;
layoutMeasurement?: Size;
}
export interface VerticalScrollToOptions extends CommonScrollToOptions {
y: number;
momentumY?: number;
x?: never;
momentumX?: never;
}
export interface HorizontalScrollToOptions extends CommonScrollToOptions {
x: number;
momentumX?: number;
y?: never;
momentumY?: never;
}
export type ScrollToOptions = VerticalScrollToOptions | HorizontalScrollToOptions;
export declare function scrollTo(this: UserEventInstance, instance: TestInstance, options: ScrollToOptions): Promise<void>;
export {};