Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa committed Jan 8, 2024
1 parent 95130c9 commit 1e71fd0
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/tools/settings-client-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ const commands = {};
commands.hasRunningForegroundService = async function hasRunningForegroundService () {
try {
const output = await this.getActivityService(SETTINGS_HELPER_ID);
return (output.includes(FORE_GROUND_APP_KEYWORD))
return (output.includes(FORE_GROUND_APP_KEYWORD));
} catch (e) {
log.warn(`Got an error in getting the foreground service state: ${e.message}`);
}
return false;
}
};

/**
* @typedef {Object} SettingsAppStartupOptions
Expand All @@ -77,16 +77,15 @@ commands.hasRunningForegroundService = async function hasRunningForegroundServic
* @returns {Promise<import('../adb.js').ADB>} self instance for chaining
*/
commands.requireRunningSettingsApp = async function requireRunningSettingsApp (opts = {}) {
const {
timeout = 5000,
shouldRestoreCurrentApp = false
} = opts;

if (await this.hasRunningForegroundService()) {
return this;
}

log.debug('Starting Appium Settings app');
const {
timeout = 5000,
shouldRestoreCurrentApp = false
} = opts;
let appPackage;
if (shouldRestoreCurrentApp) {
try {
Expand Down

0 comments on commit 1e71fd0

Please sign in to comment.