amanjeetsingh150 / react-native-is-maestro

Detect synchronously if your app is currently running in an E2E test environment with Maestro

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-is-maestro

This React Native library provides a way to detect synchronously if the app is currently running in an E2E test environment with Maestro. It can be useful for disabling certain functionality or UI elements that may interfere with the test. To use the library, simply import it and call the isMaestro() function.

Installation

npm install react-native-is-maestro
yarn add react-native-is-maestro

Auto-linking

cd ios && pod install

Supported versions

This library is fully compatible with TypeScript and can be used on both iOS and Android platforms. It also supports both old (Paper) and new architecture (Fabric) of React Native.

Lib version RN version Maestro CLI
1.0 0.71 1.19

Library may work on lower versions of React Native (with paper architecture), but it wasn't tested!

Usage

import { isMaestro } from 'react-native-is-maestro'

// ...

const result: boolean = isMaestro()

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

About

Detect synchronously if your app is currently running in an E2E test environment with Maestro

License:MIT License


Languages

Language:Java 32.2%Language:Objective-C++ 15.9%Language:Objective-C 11.2%Language:Ruby 11.1%Language:Kotlin 10.8%Language:JavaScript 8.5%Language:TypeScript 7.6%Language:Shell 2.1%Language:C 0.4%Language:Swift 0.3%