Skip to main content

All Questions

0 votes
2 answers
67 views

Snapshot Testing - Realm already opened on current thread with different schema

I have made a React Native app which uses the Realm database. Opening this app and testing it manually does not result in any errors. I have written tests for the Realm database, such as: test(&...
user27793975's user avatar
0 votes
1 answer
279 views

How to write a test case for dispatch in jest for React Native?

React.useEffect(() => { branch.subscribe(({ params }) => { if ( params && params['+clicked_branch_link'] && params['+match_guaranteed'] ) {...
Arun Kumar's user avatar
0 votes
1 answer
2k views

How to write a jest test for opening of an URL in react native?

I'm trying to write a test case for testing URL in my react native app this is my mock import { Linking } from "react-native"; jest.mock('react-native/Libraries/Linking/Linking', () => { ...
Shirin's user avatar
  • 118
17 votes
4 answers
23k views

Invariant Violation: `new NativeEventEmitter()` requires a non-null argument

I tried to run default test in react-native using jest and I found this problem: Test suite failed to run Invariant Violation: `new NativeEventEmitter()` requires a non-null argument. at invariant ...
Kamil Cessak's user avatar
0 votes
1 answer
520 views

Struggling to build with Detox

I am looking to setup automated end to end UI testing for React Native App and its my first time doing it using detox. I followed exact steps as mentioned in this article: https://varunon9.medium.com/...
pbassi's user avatar
  • 11
0 votes
1 answer
1k views

Is using testID Good or bad practice for automating Mobile Application?

I am automating React Native Application and to reduce flakiness of the UI test I am using testID. In the Detox automation, it is showing to use testID: https://github.com/wix/Detox/blob/master/docs/...
Saif Siddiqui's user avatar
1 vote
2 answers
555 views

Jest debugging in terminal error- directory missing

I am beginner in Jest learning and writing testcases. Trying to debug test file so that in terminal tried to run following command following jest document https://jestjs.io/docs/en/troubleshooting ...
Swift's user avatar
  • 907
4 votes
1 answer
2k views

Guide to automation framework in detox : React Native? Creating End 2 end and integration testing framework

Automation testing on detox for react native apps to create E2E tests and integration tests. Need suggestion on the following: Best Automation Framework that can be used TDD,BDD to avoid refactoring ...
Saif Siddiqui's user avatar
1 vote
1 answer
606 views

Mocking a React Native component method and testing whether it's called (Jest/Enzyme)

So I'm trying to test whether or not a React Native component method calls another method. const render = shallow(<Login navigator={mock Navigator} />); const instance = render.instance(); ...
mylvinta's user avatar
2 votes
1 answer
1k views

How to do automatic, on device tests for react native application?

I want to create automatic tests for an application written in react native. I want to test only logic (not the UI). Jest seems to be great solution for unit or even integration tests which will be ...
damgad's user avatar
  • 1,446