FormidableLabs / FormidableLabs/react-native-ama

useButtonChecks error with Jest

オープン
#271 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug
主要言語
TypeScript
スター
295
フォーク
22
平均マージ
20分
マージ済み PR(30日)
2

説明

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

### Code Sandbox link

_No response_

### Bug report

```markdown
When I'm testing a file using your component, I'm getting:

Cannot find module '@react-native-ama/core/src/hooks/useButtonChecks' from 'node_modules/@react-native-ama/react-native/dist/hooks/usePressable.js'

This seems to relate to this line in `usePressable.js`

`const useButtonChecks_1 = require("@react-native-ama/core/src/hooks/useButtonChecks");`

My Jest tests seem to pass when the filepath is changed, e.g. to

`const useButtonChecks_1 = require("@react-native-ama/core/");`

Could you have a look please
```

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

コンポーネントを使用するファイルをテストして Jest の失敗を再現し、その後 node_modules/@react-native-ama/react-native/dist/hooks/usePressable.js と、参照されている @react-native-ama/core パッケージのパスを調べます。失敗するサブパスのインポートとパッケージルートからのインポートを比較し、選択した解決方法が Jest テストで機能することを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
react-native, typescript
領域
mobile, testing-qa
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。