Skip to content

Latest commit

 

History

History
75 lines (46 loc) · 1.74 KB

File metadata and controls

75 lines (46 loc) · 1.74 KB

AtomicFileOps Example App

This React Native app provides an example of how the react-native-atomic-file-ops library can be imported and used. It also demonstrates how the library is able to successfully overwrite existing content in a file with truncated data.

See the library in use in the atomic file writing integration tests.

Getting Started

Install Dependencies

yarn install

For iOS:

cd ios
pod install

Running the App

Start Metro.

yarn start

Start the app.

Android:

yarn android

iOS:

yarn ios

When the app is running successfully and ready to start testing, you should see the following screen:

AtomicFileOps Example App Landing Screen

Note: The above image is of an iPhone 13 Simulator display. The appearance of your screen may vary slightly depending on which emulator, simulator, or physical device you are using.

Running the Tests

The AtomicFileOps example app uses Cavy to provide integration testing of the react-native-atomic-file-ops library. Scenarios tested include:

  • Overwriting an existing file with truncated JSON data
  • Overwriting an existing file with truncated Base64 data

To run the tests:

Android:

cavy run-android

iOS:

cavy run-ios

Test results and output should appear in either the terminal or the console (if you are connected to the React Native debugger).

Credits

Natalia Malesa