RoboJackets / RoboJackets/apiary-react-native

Develop Jest mocks for testing

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

Nobody has claimed this yet.

technical debt
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

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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.