Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@khanghoang/react-native-mock

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@khanghoang/react-native-mock

A fully mocked and test-friendly version of react native

  • 16.0.0-alpha.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-native-mock Build Status

Join the chat at https://gitter.im/RealOrangeOne/react-native-mock A fully mocked and test-friendly version of react native

Requirements

  • Node.js 4+
  • The latest version of react-native

Note: This library is designed to work with the most recent version of react-native. If you aren't using the most recent version, you will need to download an older version of this library, as the API is likely to be different, and the dependencies are likely to break.

How Am I Supposed To Use This?

npm i react-native-mock --save-dev
/* file-that-runs-before-all-of-my-tests.js */

// This will mutate `react-native`'s require cache with `react-native-mock`'s.
require('react-native-mock/mock'); // <-- side-effects!!!

Why?

Testing React Native components is hard. I'm hoping this makes it easier.

I wrote a React Testing Library that works really well for React "Web", but didn't really work for React "Native" without something like this.

Wait... Is this actually a terrible idea?

I don't know. Maybe.

I'd love to figure that out though... feel free to file an issue if you have opinions.

Contributing

Discovered a bug, got a new feature, or found something that needs improving? Submit a PR!

Make sure to read through the CONTRIBUTING.md file before submitting your PR!

Core Contributors

What do the labels mean?

See this wiki page.

Keywords

FAQs

Package last updated on 15 Jun 2017

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