netbeast / react-native-diagnose

A framework to test a React Native app during runtime

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-diagnose

npm version

A react runtime diagnose component

Rationale

  • Testing native applications is complicated
  • There are features that can only be tested on a device, unless mocked
  • You may want to test your app on a production build, before submit it to the stores
import { Diagnose, Test } from 'react-diagnose'

/**
 * Diagnose will run all test components inside
 * Test components are going to be marked visually as completed or not
 * to d
 */
return (
  <Diagnose suiteTitle="Diagnose">
    <Test should="Passing test" />
    <Test should="Unfinished test" run={() => {
      return new Promise(() => setTimeout(() => {}, 1000000))
    }} />
    <Test should="Failed test" run={() => {throw new Error('Failing test')}} />
    <Test should="Dummy test" />
  </Diagnose>
)

demo screenshot

Help wanted

  • Elapsed time
  • Before all
  • Before each
  • After each
  • After all

More documentation is incoming, in the meanwhile please read the source code. It is a single file! PRs and issues are more than welcome.

works with yeti

 This package powers Yeti Smart Home and is used in production.

Follow us in Github or https://twitter.com/netbeast_co.

About

A framework to test a React Native app during runtime

License:MIT License


Languages

Language:JavaScript 57.9%Language:Objective-C 24.6%Language:Python 9.6%Language:Java 7.8%