Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Salakar committed Jun 24, 2024
1 parent c634585 commit 6ef25c7
Showing 1 changed file with 66 additions and 8 deletions.
74 changes: 66 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,17 @@
<a href="https://twitter.com/invertaseio"><img src="https://img.shields.io/twitter/follow/invertaseio.svg?style=social&label=Follow" alt="Follow on Twitter"></a>
</p>


---

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 [istanbul/nyc](https://github.com/istanbuljs/nyc) coverage support (`--coverage`).
-

![image](https://github.com/invertase/jet/assets/5347038/d0ca2c5b-7eee-48bb-94b5-21881455142d)
- ⏩ 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 [istanbul/nyc](https://github.com/istanbuljs/nyc) coverage support (`--coverage`).
-

![image](https://github.com/invertase/jet/assets/5347038/d0ca2c5b-7eee-48bb-94b5-21881455142d)

---

Expand All @@ -34,12 +33,71 @@ Jet lets you test your React Native Module APIs in JS mock free and native testi

## Quick Setup

```sh
yarn add jet
```
$ yarn add jet
```

TODO - updated docs
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>)
// [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?

Expand Down

0 comments on commit 6ef25c7

Please sign in to comment.