JSPM

@colorfy-software/detoxify

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q20148F
  • License MIT

Useful helpers for E2E testing in React Native with Detox

Package Exports

  • @colorfy-software/detoxify
  • @colorfy-software/detoxify/lib/commonjs/index.js
  • @colorfy-software/detoxify/lib/module/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@colorfy-software/detoxify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

๐Ÿงช Detoxify

Useful helpers for E2E testing in React Native with Detox.

Current GitHub Actions build status. Current npm package version. PRs welcome!

๐ŸŽฏ Purpose

Detox is a library that provides gray box end-to-end testing and automation for React Native apps. Detoxify has been built on top of it to provide a useful set of tools to make that experience even more delightful.

๐Ÿ—๏ธ Installation

yarn add @colorfy-software/detoxify

Also install and set up:

  1. detox
  2. jest

๐Ÿ’ป Usage

Setup

// ./e2e/environment.js

const DetoxHelpers = require('@colorfy-software/detoxify')
const { DetoxCircusEnvironment, SpecReporter, WorkerAssignReporter } = require('detox/runners/jest-circus')

class CustomDetoxEnvironment extends DetoxCircusEnvironment {
  constructor(config, context) {
    super(config, context)

    // ๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡
    DetoxHelpers.init({
      translations: require('../src/locales/en.ts'),
      // optional
      // runOnly: []
    })
    // ๐Ÿ‘†๐Ÿ‘†๐Ÿ‘†

    // Can be safely removed, if you are content with the default value (=300000ms)
    this.initTimeout = 300000

    // This takes care of generating status logs on a per-spec basis. By default, Jest only reports at file-level.
    // This is strictly optional.
    this.registerListeners({
      SpecReporter,
      WorkerAssignReporter,
    })
  }
}

module.exports = CustomDetoxEnvironment

Use cases

Content coming soon.

๐Ÿค Contributing

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

๐Ÿ’– Code of Conduct

This library has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.

๐Ÿ“ฐ License

detoxify is licensed under the MIT License.