mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2025-12-23 22:18:36 -05:00
fix tooltip implementation
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
import { screen } from "@testing-library/react-native";
|
||||
import AddObsButton from "components/AddObsBottomSheet/AddObsButton";
|
||||
import { navigationRef } from "navigation/navigationUtils";
|
||||
import React from "react";
|
||||
import { renderComponent } from "tests/helpers/render";
|
||||
|
||||
// Mock getCurrentRoute to return ObsList
|
||||
jest.mock( "navigation/navigationUtils", () => ( {
|
||||
getCurrentRoute: () => ( {
|
||||
name: "ObsList"
|
||||
} )
|
||||
} ) );
|
||||
// Mock methods needed to get the current route
|
||||
navigationRef.isReady = jest.fn( () => true );
|
||||
navigationRef.getCurrentRoute = jest.fn( () => ( { name: "ObsList" } ) );
|
||||
navigationRef.addListener = jest.fn( () => jest.fn() );
|
||||
|
||||
jest.mock( "sharedHooks/useCurrentUser", () => ( {
|
||||
__esModule: true,
|
||||
|
||||
Reference in New Issue
Block a user