vn-verdnaturachat/e2e/tests/init.ts

30 lines
755 B
TypeScript
Raw Normal View History

import detox from 'detox';
import adapter from 'detox/runners/mocha/adapter';
import { detox as config } from '../../package.json';
import { setup } from '../helpers/data_setup';
import { prepareAndroid } from '../helpers/app';
2018-05-23 13:39:18 +00:00
before(async () => {
// @ts-ignore
await Promise.all([setup(), detox.init(config, { launchApp: false })]);
await prepareAndroid(); // Make Android less flaky
// await dataSetup()
// await detox.init(config, { launchApp: false });
// await device.launchApp({ permissions: { notifications: 'YES' } });
});
beforeEach(async function () {
// @ts-ignore
await adapter.beforeEach(this);
});
afterEach(async function () {
// @ts-ignore
await adapter.afterEach(this);
2018-05-23 13:39:18 +00:00
});
after(async () => {
2018-05-23 13:39:18 +00:00
await detox.cleanup();
});