RoboJackets / RoboJackets/apiary-react-native
Develop Jest mocks for testing
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Currently, the app's tests fail since they try to import React Native modules, which is not possible on a non-mobile device. Jest mocks (which "mock" the React Native modules) should be added so that tests can be performed correctly.
One method of implementing this is creating a Jest config file that runs a setup file containing mocks for all necessary packages before tests are run. This way, Jest mocks will have already been set up for all tests that will be run.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the tests that fail when they import React Native modules and inspect the current Jest configuration. Add the mentioned Jest config and setup file with mocks for the necessary packages. Done means the test suite can run correctly on a non-mobile device.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile, testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100