///
///
import { MockLocation } from "./Location";
import { Mock } from "./mocks";
import { MockNavigator } from "./Navigator";
import { MockPerformance } from "./Performance";
import { MockStorage } from "./Storage";
export interface MockWindowMembers {
addEventListener: Mock;
alert: Mock;
blur: Mock;
close: Mock;
confirm: Mock;
dispatchEvent: Mock;
focus: Mock;
getSelection: Mock;
localStorage: MockStorage;
location: MockLocation;
matchMedia: Mock;
moveBy: Mock;
navigator: MockNavigator;
open: Mock;
performance: MockPerformance;
postMessage: Mock;
print: Mock;
prompt: Mock;
removeEventListener: Mock;
requestAnimationFrame: Mock;
requestIdleCallback: Mock;
resizeBy: Mock;
resizeTo: Mock;
scrollBy: Mock;
scrollTo: Mock;
sessionStorage: MockStorage;
setImmediate: Mock;
stop: Mock;
top: MockWindowMembers;
}
export declare class MockWindow implements MockWindowMembers {
addEventListener: jest.Mock;
alert: jest.Mock;
blur: jest.Mock;
close: jest.Mock;
confirm: jest.Mock;
dispatchEvent: jest.Mock;
focus: jest.Mock;
getSelection: jest.Mock;
localStorage: MockStorage;
location: {
assign: jest.Mock;
hash: string;
href: string;
host: string;
origin: string;
pathname: string;
search: string;
reload: jest.Mock;
};
matchMedia: jest.Mock;
moveBy: jest.Mock;
navigator: {
clipboard: {
read: jest.Mock, []>;
readText: jest.Mock, []>;
write: jest.Mock, [data: ClipboardItems]>;
writeText: jest.Mock, [data: string]>;
};
userAgent: string | undefined;
serviceWorker: {
controller?: ServiceWorker | null | undefined;
oncontrollerchange?: ((this: ServiceWorkerContainer, ev: Event) => any) | null | undefined;
onmessage?: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null | undefined;
onmessageerror?: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null | undefined;
ready?: Promise | undefined;
getRegistration: ((clientURL?: string | URL | undefined) => Promise) | jest.Mock, [clientURL?: string | URL | undefined]>;
getRegistrations: (() => Promise) | jest.Mock, []>;
register: ((scriptURL: string | URL, options?: RegistrationOptions | undefined) => Promise) | jest.Mock, [scriptURL: string | URL, options?: RegistrationOptions | undefined]>;
startMessages: (() => void) | jest.Mock;
addEventListener: {
(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
} | jest.Mock;
removeEventListener: {
(type: K_1, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K_1]) => any, options?: boolean | EventListenerOptions | undefined): void;
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
} | jest.Mock;
dispatchEvent?: ((event: Event) => boolean) | undefined;
} | undefined;
platform: string;
sendBeacon: jest.Mock;
};
open: jest.Mock;
performance: {
clearMarks: jest.Mock;
clearMeasures: jest.Mock;
clearResourceTimings: jest.Mock;
getEntries: jest.Mock;
getEntriesByName: jest.Mock;
getEntriesByType: jest.Mock;
mark: jest.Mock;
measure: jest.Mock;
now: jest.Mock;
setResourceTimingBufferSize: jest.Mock;
toJSON: jest.Mock;
};
postMessage: jest.Mock;
print: jest.Mock;
prompt: jest.Mock;
removeEventListener: jest.Mock;
requestAnimationFrame: jest.Mock;
requestIdleCallback: jest.Mock;
resizeBy: jest.Mock;
resizeTo: jest.Mock;
scrollBy: jest.Mock;
scrollTo: jest.Mock;
sessionStorage: MockStorage;
setImmediate: jest.Mock void, ...args: any[]]>;
stop: jest.Mock;
top: MockWindow;
constructor(settings?: Partial);
}