What is this about?
The component-view test framework's mock policy restricts mocks to Engine and react-native-device-info only. However, getTrendingTokens from @metamask/assets-controllers is a standalone service function called directly from components (e.g. via useTrendingSearch), not through a controller on Engine.
Because it's not exposed via Engine, there's no way to drive its behavior through Redux state in tests. This forces a manual jest.mock('@metamask/assets-controllers', ...) in the shared mocks.ts — an anti-pattern for this test framework.
Stakeholder review needed before the work gets merged
What is this about?
The component-view test framework's mock policy restricts mocks to Engine and react-native-device-info only. However, getTrendingTokens from @metamask/assets-controllers is a standalone service function called directly from components (e.g. via useTrendingSearch), not through a controller on Engine.
Because it's not exposed via Engine, there's no way to drive its behavior through Redux state in tests. This forces a manual jest.mock('@metamask/assets-controllers', ...) in the shared mocks.ts — an anti-pattern for this test framework.
Stakeholder review needed before the work gets merged