react-navigation / react-navigation/react-navigation.github.io

Mocking RN NativeAnimatedHelper - path has been changed

Open Beginner friendly
#1,516 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
324
Forks
2k
PR merge metrics
No merged PRs in 30d

Description

RN Animated NativeAnimatedHelper.js path has been changed since RN 0.76. The new path should be:

jest.mock('react-native/src/private/animated/NativeAnimatedHelper');

This snippet needs to be updated to mention the new and old paths.

https://github.com/react-navigation/react-navigation.github.io/blob/main/versioned_docs/version-7.x/testing.md?plain=1#L67

// Silence the warning: Animated: `useNativeDriver` is not supported because the native animated module is missing
import { jest } from '@jest/globals';

// For RN >= 0.76
jest.mock('react-native/src/private/animated/NativeAnimatedHelper');

// For RN <0.76
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open versioned_docs/version-7.x/testing.md around line 67 and review the React Native Animated mocking snippet. Update it to show the new path for RN >= 0.76 and the old path for RN < 0.76, then verify the rendered documentation clearly presents both options.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
94/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.