/** * A mock implementation of the navigation interface for testing purposes. * * @remarks * This class simulates browser navigation behavior without relying on the actual DOM History API. * It allows tests to assert on navigation events and current URL state. */ export declare class MockNavigation extends EventTarget { /** The set of listeners subscribed to navigation changes. */ listeners: Set<() => void>; /** The current navigation entry (URL). */ currentEntry: { url: string; }; /** * Returns the current navigation entry. * * @returns The current entry object containing the URL. */ getCurrentEntry(): { url: string; }; /** * Subscribes a callback to navigation events. * * @param fn - The callback function to execute on navigation. * @returns A cleanup function to unsubscribe the listener. */ subscribe(fn: () => void): () => void; /** * Simulates pushing a new URL to the history stack. * * @param url - The URL to navigate to. */ push(url: string): void; /** * Alias for {@link push}. * * @param url - The URL to navigate to. */ navigate(url: string): void; /** * Returns the history entries. * * @returns An array containing the current entry. */ entries(): { url: string; }[]; /** * Checks if backward navigation is possible. * * @returns Always `false` in this mock implementation. */ canGoBack(): boolean; /** * Checks if forward navigation is possible. * * @returns Always `false` in this mock implementation. */ canGoForward(): boolean; /** * Simulates a page reload. * * @remarks No-op in this mock. */ reload(): void; /** * Simulates traversing to a specific history entry. * * @remarks No-op in this mock. */ traverseTo(): void; /** * Simulates navigating back. * * @remarks No-op in this mock. */ back(): void; /** * Simulates navigating forward. * * @remarks No-op in this mock. */ forward(): void; /** * Updates the current entry. * * @remarks No-op in this mock. */ updateCurrentEntry(): void; }