declare module 'maddox' { export interface MaterializedResponse { status: number; statusText: string; headers: Record; body: any; } export interface InvocationEntry { mockName: string; kind: 'loader' | 'action'; value: any | MaterializedResponse; error: any; } export type TestCallback = (err: Error | undefined, response: T) => void | Promise; export class Scenario { constructor(testContext?: any); mockThisFunction(mockName: string, funcName: string, object: any): this; withEntryPoint(entryPointObject: any, entryPointFunction: string): this; withInputParams(inputParamsIn: any[]): this; shouldBeCalledWith(mockName: string, funcName: string, params: any[]): this; doesReturnWithPromise(mockName: string, funcName: string, dataToReturn: any): this; doesReturnWithCallback(mockName: string, funcName: string, dataToReturn: any[]): this; test(callback: TestCallback): Promise; } export class FrameworkRouteScenario extends Scenario { addStub(descriptor: { mockName?: string; id?: string; path: string; module: { default?: any; loader?: Function; action?: Function; HydrateFallback?: any; ErrorBoundary?: any; }; children?: any[]; HydrateFallback?: any; ErrorBoundary?: any; }): this; withInitialEntries(entries: string[]): this; disableSerialization(): this; withStubAppContext(context: any): this; withRequestMiddleware(middlewareFn: (args: { request: any; params: object; context: object; }) => object | Promise): this; /** * @deprecated withEntryPoint is not supported in FrameworkRouteScenario/RemixScenario. * The entry point is automatically handled via 'addStub' and an execution boundary ('.triggerRender()', '.triggerAction()', or '.triggerLoader()'). */ withEntryPoint(entryPointObject: any, entryPointFunction: string): never; /** * @deprecated Use triggerRender instead. */ render(options?: { waitForIdle?: boolean }): this; triggerRender(options?: { waitForIdle?: boolean }): this; next(stepFn: (ctx: { screen: any; waitFor: any; render: any; cleanup: any; userEvent: any; }) => void | Promise): this; triggerAction(target: string | { mockName?: string; id?: string; path: string; module: any; [key: string]: any; }, args?: { method?: string; body?: any; encType?: string; params?: object; context?: object; url?: string; [key: string]: any; }): this; triggerLoader(target: string | { mockName?: string; id?: string; path: string; module: any; [key: string]: any; }, args?: { params?: object; context?: object; url?: string; [key: string]: any; }): this; test(callback: TestCallback): Promise; } const Maddox: { functional: { HttpReqScenario: any; FromPromiseScenario: typeof Scenario; FromCallbackScenario: typeof Scenario; FromSynchronousScenario: typeof Scenario; FrameworkRouteScenario: typeof FrameworkRouteScenario; RemixScenario: typeof FrameworkRouteScenario; }; scenarios: { HttpReqScenario: any; FromPromiseScenario: typeof Scenario; FromCallbackScenario: typeof Scenario; FromSynchronousScenario: typeof Scenario; FrameworkRouteScenario: typeof FrameworkRouteScenario; RemixScenario: typeof FrameworkRouteScenario; }; constants: { EmptyParameters: any[]; EmptyResult: any; IgnoreParam: string; }; compare: any; }; export default Maddox; }