jest-environment-detox
v1.0.6
Published
## Pitch & Anti-pitch
Downloads
6
Readme
jest-environment-detox
Pitch & Anti-pitch
- Inspired by jest-environment-puppeteer implementation
- Allow a detox server to be shared between multiple test suites
- Make sure app is not reinstalled between test suites (Fixes #1331 and #1331)
- Anti-pitch: Uses detox & jest private APIs
- Anti-pitch: Somewhat opionated
Usage
Add dependency
yarn add -D jest-environment-detox
Update your Jest configuration:
{ "globalSetup": "jest-environment-detox/setup", "globalTeardown": "jest-environment-detox/teardown" }
Update your
detox.init
call// ./jest/setup.js import { getDetoxSession } from 'jest-environment-detox'; const config = require('../package.json').detox; beforeAll(async () => { await detox.init({ ...config, session: getDetoxSession(process.env.JEST_WORKER_ID), }, { launchApp: false, reuse: true, }); });