Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/invertase/jet
✈️ Test your React Native modules e2e; mock-free and native testing code free.
https://github.com/invertase/jet
Last synced: 11 days ago
JSON representation
✈️ Test your React Native modules e2e; mock-free and native testing code free.
- Host: GitHub
- URL: https://github.com/invertase/jet
- Owner: invertase
- License: other
- Created: 2018-08-06T02:24:05.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-10-11T14:53:52.000Z (29 days ago)
- Last Synced: 2024-10-19T02:14:46.128Z (22 days ago)
- Language: TypeScript
- Homepage: https://invertase.io
- Size: 2.58 MB
- Stars: 99
- Watchers: 13
- Forks: 11
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Jet
---
Jet lets you test your React Native Module APIs in JS mock free and native testing code free - ideal for testing React Native modules e2e.
**Features:**
- ⏩ Test with JavaScript - write your native module tests in javascript and fully e2e test them.
- 💯 Coverage - get full code coverage output for your React Native module's JS API with built in coverage support (`--coverage`).![image](https://github.com/invertase/jet/assets/5347038/d0ca2c5b-7eee-48bb-94b5-21881455142d)
---
> Latest supported React Native version: **^0.74**
---
## Quick Setup
```sh
yarn add [email protected]
```These docs are still TODO, for now see [example](./example), in particular:
Configuring Jet and targets:
- [.jetrc.js](./example/.jetrc.js)
Adding the test UI and your tests:
- [App.tsx](./example/App.tsx)
Configuring coverage instrumentation:
- [babel.config.js](./example/babel.config.js)
- [nyc.config.js](./example/nyc.config.js)### Running tests
```sh
jet --target=macos
```### `.jetrc.js`
Example:
```js
const proc = require('node:child_process');module.exports = {
config: {
// Global config overrides/defaults...
},
targets: {
// Use any key name to specify a new 'target' (--target=)
// [key: string]: { ... }
macos: {
// --target=macos
config: {
// Per target config overrides...
// These will override in order of:
// ...cliFlags
// ...globalConfig
// ...targetConfig
},
/**
* Use this to run builds, start the application etc.
*/
async before(config) {
proc.spawnSync('npx', ['react-native', 'run-macos']);
return config;
},
/**
* Use this for cleanup & teardown.
*/
async after(config) {
console.log('After');
},
},
},
};
```## 💛 How can I help?
For now please see the open issues tracking work that needs doing discussions and thoughts on these issues and on Jet will help us mature the project into a useful tool.
---
## 😎 Projects using Jet
These projects use Jet to test their modules:
- [React Native Firebase](https://github.com/invertase/react-native-firebase): 🔥 A well tested feature rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for over 15 Firebase services.
Submit a PR to add your project here.