UNPKG

detox

Version:

E2E tests and automation for mobile

19 lines (15 loc) 462 B
class AppUninstallHelper { constructor(adb) { this._adb = adb; } async uninstall(deviceId, bundleId) { if (await this._adb.isPackageInstalled(deviceId, bundleId)) { await this._adb.uninstall(deviceId, bundleId); } const testBundleId = `${bundleId}.test`; if (await this._adb.isPackageInstalled(deviceId, testBundleId)) { await this._adb.uninstall(deviceId, testBundleId); } } } module.exports = AppUninstallHelper;