react-native-webrtc / react-native-webrtc/react-native-callkeep

Add Jest Mock for RNCallKeep

Open
#369 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.1k
Forks
511
Avg merge
9h 12m
Merged PRs (30d)
2

Description

Problem

  • I need to be able to use RN-callkeep without a native device being required.
Invariant Violation: Native module cannot be null.

  at invariant (node_modules/invariant/invariant.js:40:15)
  at new NativeEventEmitter (node_modules/react-native/Libraries/EventEmitter/NativeEventEmitter.js:36:7)
  at Object.<anonymous> (node_modules/react-native-callkeep/actions.js:4:22)
  at Object.<anonymous> (node_modules/react-native-callkeep/index.js:3:1)\

Proposal

I would like to add a jest mock similar to how these libraries have implemented jest/ folders for easy import

PATH /jest/react-native-call-keep-mock.js


Approach

  • All external methods on RNCallKeep complete
  • No regression in tests
  • Update readme to notify about how to test

Notes

Contributor guide

No contributing guide indexed for this repository

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 comparing the requested /jest/react-native-call-keep-mock.js with the linked Jest mock implementations. Inspect RNCallKeep's external methods and existing tests, then update the README with usage instructions. Done means the mock covers all external methods and the test suite has no regressions.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.