1.0.6 • Published 5 years ago

jest-environment-detox v1.0.6

Weekly downloads
21
License
ISC
Repository
-
Last release
5 years ago

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

  1. Add dependency

    yarn add -D jest-environment-detox
  2. Update your Jest configuration:

    {
      "globalSetup": "jest-environment-detox/setup",
      "globalTeardown": "jest-environment-detox/teardown"
    }
  3. 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,
    	});
    });
     	 
1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago