@ondc/automation-mock-runner
Version:
A TypeScript library for ONDC automation mock runner
35 lines (34 loc) • 949 B
TypeScript
/**
* Mock browser environment for testing BrowserRunner
*/
declare const mockBrowserGlobals: () => {
Worker: {
new (url: string | URL): {
messageHandlers: Set<(event: MessageEvent) => void>;
postMessage(data: any): void;
terminate(): void;
addEventListener(type: string, listener: EventListener): void;
removeEventListener(type: string, listener: EventListener): void;
dispatchEvent(event: Event): boolean;
};
};
Blob: {
new (content: string[], options?: any): {
content: string[];
options: any;
};
};
URL: {
createObjectURL: (blob: {
content: string[];
options: any;
}) => string;
revokeObjectURL: (url: string) => void;
};
window: {};
document: {};
performance: {
now: () => number;
};
};
export { mockBrowserGlobals };