useButtonChecks error with Jest

Open
#271 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
react-native, typescript
Domain
mobile, testing-qa

Research direction

Reproduce the Jest failure while testing a file that uses the

component, then inspect node_modules/@react-native-ama/react-native/dist/hooks/usePressable.js and the referenced @react-native-ama/core package path. Compare the failing subpath import with the package-root import and confirm that the chosen resolution works in the Jest test.

Written by the indexing model from the issue text.

Description

bug
Is there an existing issue for this?
  • I have searched the existing issues
Code of Conduct
  • I agree to follow this project's Code of Conduct
Code Sandbox link

No response

Bug report
When I'm testing a file using your <Form /> 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
Dominant language
TypeScript
Stars
295
Forks
22
Avg merge
20m
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

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.

More from FormidableLabs/react-native-ama

All issues in FormidableLabs/react-native-ama

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.