npm.io
1.0.4 • Published 7 years ago

react-native-test-library-damiansf

Licence
Version
1.0.4
Deps
0
Size
5 kB
Vulns
0
Weekly
0

react-native-test-library

Basic toast test library for react native (Android only). Published on NPM https://www.npmjs.com/package/react-native-test-library-damiansf

Getting started

$ npm install react-native-test-library --save

Mostly automatic installation

$ react-native link react-native-test-library

Manual installation
Android
  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrarynativetoast.RNTestLibraryPackage; to the imports at the top of the file
  • Add new RNTestLibraryPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-test-library'
    project(':react-native-test-library').projectDir = new File(rootProject.projectDir,     '../node_modules/react-native-test-library/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
    compile project(':react-native-test-library')

Usage

import RNTestLibrary from 'react-native-test-library';

// TODO: What to do with the module?
RNTestLibrary;

Keywords