How to use the cavy/src/TestHookStore function in cavy

To help you get started, we’ve selected a few cavy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Nozbe / WatermelonDB / src / index.integrationTests.native.js View on Github external
/* eslint-disable import/first */

process.env.NODE_ENV = 'test'

import React from 'react'
import { AppRegistry, Text, NativeModules } from 'react-native'
import Tester from 'cavy/src/Tester'
import TestHookStore from 'cavy/src/TestHookStore'
import integrationTests from './__tests__/integrationTests'

// Mysteriously fixes React Native stacktrace symbolication ¯\_(ツ)_/¯
if (typeof global.self === 'undefined') {
  global.self = global
}

const testHookStore = new TestHookStore()
const sendReport = report => {
  // eslint-disable-next-line
  console.log(report)
  NativeModules.BridgeTestReporter.testsFinished(report)
}
const TestRoot = () => (
  
    
  
)
AppRegistry.registerComponent('watermelonTest', () => TestRoot)

cavy

An integration test framework for React Native.

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis