Mocking RN NativeAnimatedHelper - path has been changed

未關閉 適合新手
#1,516 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
1/5
預估耗時
1 小時以內
新手友好度
94/100
Issue 類型
文件
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
react-native
領域
documentation

研究方向

開啟 versioned_docs/version-7.x/testing.md 約第 67 行的位置,並檢視 React Native Animated mocking 程式碼片段。更新它以顯示 RN >= 0.76 的新路徑和 RN < 0.76 的舊路徑,然後確認呈現後的文件是否清楚地呈現這兩個選項。

由索引模型根據 Issue 內容生成。

描述

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');
主要語言
JavaScript
星號
324
分支
2k
PR 合併指標
30 天內沒有已合併 PR

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

react-navigation/react-navigation.github.io 的其他 Issue

查看 react-navigation/react-navigation.github.io 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。