# @moqada/react-native-mock

> A fully mocked and test-friendly version of react native

Latest version **0.0.6** (published 2016-04-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @moqada/react-native-mock
pnpm add @moqada/react-native-mock
yarn add @moqada/react-native-mock
bun add @moqada/react-native-mock
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2016-04-12 |
| First published | 2016-04-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 13 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 564 |
| Author | Leland Richardson |
| Maintainers | moqada |
| Keywords | react, react-native, mock, testing |

## Links

- npm: https://www.npmjs.com/package/@moqada/react-native-mock
- Repository: https://github.com/lelandrichardson/react-native-mock
- Homepage: https://github.com/lelandrichardson/react-native-mock#readme
- Issues: https://github.com/lelandrichardson/react-native-mock/issues
- npm.io page: https://npm.io/package/@moqada/react-native-mock

## Dependencies (13)

- [raf](https://npm.io/package/raf.md) ^3.1.0
- [warning](https://npm.io/package/warning.md) ^2.1.0
- [invariant](https://npm.io/package/invariant.md) ^2.2.0
- [keymirror](https://npm.io/package/keymirror.md) ^0.1.1
- [cubic-bezier](https://npm.io/package/cubic-bezier.md) ^0.1.2
- [react-addons-perf](https://npm.io/package/react-addons-perf.md) ^0.14.7
- [react-timer-mixin](https://npm.io/package/react-timer-mixin.md) ^0.13.3
- [react-addons-update](https://npm.io/package/react-addons-update.md) ^0.14.7
- [react-addons-test-utils](https://npm.io/package/react-addons-test-utils.md) ^0.14.7
- [react-addons-create-fragment](https://npm.io/package/react-addons-create-fragment.md) ^0.14.7
- [react-addons-clone-with-props](https://npm.io/package/react-addons-clone-with-props.md) ^0.14.7
- [react-addons-pure-render-mixin](https://npm.io/package/react-addons-pure-render-mixin.md) ^0.14.7
- [react-addons-linked-state-mixin](https://npm.io/package/react-addons-linked-state-mixin.md) ^0.14.7

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.6 (latest) — 2016-04-12

## README

# react-native-mock
A fully mocked and test-friendly version of react native


## How Am I Supposed To Use This?

```bash
npm i react-native-mock --save-dev
```

```js
/* 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.

---
_Source: https://npm.io/package/@moqada/react-native-mock · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
