mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-13 09:39:18 +08:00
29 lines
755 B
JavaScript
29 lines
755 B
JavaScript
/* eslint-disable jest/no-jasmine-globals, import/no-commonjs */
|
|
|
|
const detox = require('detox');
|
|
const config = require('../../package.json').detox;
|
|
const adapter = require('detox/runners/jest/adapter');
|
|
const specReporter = require('detox/runners/jest/specReporter');
|
|
|
|
// Set the default timeout
|
|
jest.setTimeout(120000);
|
|
|
|
jasmine.getEnv().addReporter(adapter);
|
|
|
|
// This takes care of generating status logs on a per-spec basis. By default, jest only reports at file-level.
|
|
// This is strictly optional.
|
|
jasmine.getEnv().addReporter(specReporter);
|
|
|
|
beforeAll(async () => {
|
|
await detox.init(config);
|
|
}, 300000);
|
|
|
|
beforeEach(async () => {
|
|
await adapter.beforeEach();
|
|
});
|
|
|
|
afterAll(async () => {
|
|
await adapter.afterAll();
|
|
await detox.cleanup();
|
|
});
|