Files
Yaroslav SerhieievandGitHub abf3e13cd7 fix: logger termination and detox init (#3785)
* fix: incorrect logger termination
* fix: non-strict equality typo
2022-12-28 16:29:17 +02:00

28 lines
462 B
JavaScript

const detox = require('detox/internals');
const log = detox.log.child({ cat: ['lifecycle'] });
async function main() {
try {
await detox.init();
await test1();
await test2();
} finally {
await detox.cleanup();
}
}
async function test1() {
log.info('Test 1');
await device.launchApp();
}
async function test2() {
log.info('Test 2');
await device.terminateApp();
}
main().catch((e) => {
console.error(e);
process.exit(1);
});