UNPKG

shallow-react-snapshot

Version:

Enzyme-like shallow snapshots with React Testing Library

38 lines (37 loc) 1.05 kB
export interface ReactTestObject { $$typeof: symbol | number; type: string; props?: Record<string, unknown>; children?: null | ReactTestChild[]; } export type ReactTestChild = ReactTestObject | string | number; export type ReactComponent = any; export type MemoizedState = { memoizedState?: number; queue?: { lastRenderedState: number; }; }; export interface FiberOrInternalInstance { type: any; elementType?: any; memoizedProps: Record<string, unknown>; memoizedState: MemoizedState; updateQueue?: { baseState: any; baseQueue: any; lastBaseUpdate: any; }; child: FiberOrInternalInstance | null; sibling: FiberOrInternalInstance | null; return: FiberOrInternalInstance | null; alternate: FiberOrInternalInstance | null; _debugOwner: FiberOrInternalInstance; _debugHookTypes: string[] | null; } export interface ChildrenFiberOrInternalInstance { $$typeof: symbol | number; children?: ReactTestChild[]; props?: any; type?: any; }