import * as ReactNative from "react-native" ; import mockFile from "./mock-file" ; jest . doMock ( "react-native" , ( ) => { return Object . setPrototypeOf ( { Image : { ... ReactNative . Image , resolveAssetSource : jest . fn ( ( source ) => mockFile ) , getSize : jest . fn ( ( uri , success , failure ? ) => success ( 100 , 100 ) ) , } , } , ReactNative ) ; } ) ;