mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2025-12-23 22:18:36 -05:00
Remove unneeded getImageDimensions helper function. (#3200)
* Remove unneeded `getImageDimensions` helper function.
The built-in React Native function has an `async` API that we can call directly.
* Legit test failure
* Import Image from React Native
* Prefer using styledComponents.Image.getSize
* Revert "Prefer using styledComponents.Image.getSize"
This reverts commit 103ca9b3ef.
This commit is contained in:
@@ -6,9 +6,7 @@ import { Image } from "react-native";
|
||||
import factory from "tests/factory";
|
||||
import faker from "tests/helpers/faker";
|
||||
|
||||
Image.getSize = jest.fn( ( uri, callback ) => {
|
||||
callback( { width: 1024, height: 768 } );
|
||||
} );
|
||||
Image.getSize = jest.fn( ( _uri, _callback ) => async () => ( { width: 1024, height: 768 } ) );
|
||||
|
||||
const mockObservation = factory( "LocalObservation", {
|
||||
created_at: "2022-11-27T19:07:41-08:00",
|
||||
|
||||
Reference in New Issue
Block a user