mirror of
https://github.com/hanzoai/Detox.git
synced 2026-09-24 16:55:12 +00:00
* fix: incorrect logger termination * fix: non-strict equality typo
28 lines
462 B
JavaScript
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);
|
|
});
|