import { of , NEVER } from 'rxjs' ; import { createMockLayout } from '../layouts/mock' ; import type { getScreenshots , ScreenshotResult } from '.' ; export function createMockScreenshots ( ) { return { getScreenshots : jest . fn ( ( driverFactory , logger , options ) => of ( { layout : createMockLayout ( ) , metrics$ : NEVER , results : options . urls . map ( ( ) => ( { timeRange : null , screenshots : [ { data : Buffer . from ( 'screenshot' ) , description : null , title : null , } , ] , } ) ) , } as ScreenshotResult ) ) , } ; }