react-native-jest-environment
Provides an API in JS to access a React Native Jest runtime, so that you don't
have to use the jest
CLI to be able to use Jest's great React Native mocking.
Usage
;; // Any optional mocks that might reach into native// Think jest.mock()const mocks = "StatusBar" ;;
Cucumber
This was originally made for use with cucumber.js!
A convenient way to access the mockRequire
in your step definitions is to
load the Jest environment in a Before
hook in a support file:
;; module { this;};
And then in a step...
;;; module { this; this;};