New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jet

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jet

Bring your React Native JS code into Node.js and test it mock-free and native code free. Perfect for React Native module developers wanting full CI.

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
197
decreased by-32.07%
Maintainers
2
Weekly downloads
 
Created
Source


Jet

NPM downloads NPM version License Chat Follow on Twitter

WARNING: Jet (formerly Bridge) is currently a Proof of Concept, APIs and usage is likely to change by the first release version.

This repo is in development and does not have a full release version yet. v0.1.0 is the latest stable version in it's current form - this works on Android & iOS on React Native ^0.56-57 and Detox ^9.0.1.


Jet lets you bring your React Native JS code into NodeJS and test it mock free and native testing code free. Perfect for React Native module developers who want to fully test their packages end-to-end and setup continuous integration services.

Jet extends upon wix/detox and by default the Mocha testing framework.

Detox provides all the functionality you'll need to control your testing app, device and it's UI (if you have one) whilst Jet allows JS code execution in the context of your RN app via Node.js - giving you full access to all the Native api's exactly like you'd have inside your app.


Latest supported React Native version: ^0.56.0

Latest supported Detox version: ^8.1.0


Features

⏩ Test with JavaScript

Your test suites and your React Native code run inside NodeJS - making testing your modules with NodeJS testing frameworks (mocha only currently) easy.

test suite

🐞 Debugging

Supports debugging your test suites and your React Native JS bundle using the standard NodeJS debugger protocol.

debugging

💯 Coverage

Get full code coverage output for your React Native module's JS API using istanbul/nyc coverage tools.

coverage

☕️ Full Detox API support

Supports the full Detox API; reloading or relaunching your app automatically reconnects to your React Native JS bundle.

detox

✨ Full access to React Native bundle context

Jet gives you full access to the JS context of your React Native app inside NodeJS ⚡️.

Some examples of what you can do with this power:

  • Expose your root view/component to Jet on mount; allowing you to then programatically modify it inside tests, e.g. calling setState() on it inside a test - why not?
  • Expose your stores, allowing them to be controlled in tests - e.g. Redux.
  • Require any of your React Native apps bundled modules/files inside NodeJS, for example;
    • const { Platform } = jet.require('react-native'); - e.g. - platform specific test logic.
    • const CollectionReference = jet.require('dist/modules/firestore/CollectionReference'); - e.g. for instanceof tests.

⏱ Timing API -> NodeJS

Experimental

React Native JSTiming/Timing/RCTTiming modules in Jet run inside NodeJS, this means that all timers are handled directly in NodeJS with no calls to Native device APIs using Jets custom Timing class

This greatly increases the speed of tests and reduces round trips to native. Additionally this bypasses issues such as Android device time drifting (due to a incorrect date/time on device). This can also potentially be used to monitor FPS or control the FPS rate programmatically.



📖 Documentation

Sorry the docs are still to be written up - but an idea APIs/what you can do with it can been seen in the early Jet testing suite here for React Native Firebase. There's also the React Native Firebase testing project for reference.

💛 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: 🔥 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.

Keywords

FAQs

Package last updated on 27 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc