How to use the appium-ios-driver.utils.clearLogs function in appium-ios-driver

To help you get started, we’ve selected a few appium-ios-driver examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github appium / appium-xcuitest-driver / lib / utils.js View on Github external
fs.unlink(itemPath)
      // eslint-disable-next-line promise/prefer-await-to-then
      .then(() => {
        cleanedFilesCount++;
      }).catch(() => {});
  })).finally(() => {
    if (cleanedFilesCount > 0) {
      log.info(`Successfully cleaned up ${cleanedFilesCount} ` +
        `temporary XCTest log file${cleanedFilesCount === 1 ? '' : 's'}`);
    }
  }).catch(() => {});
  log.debug(`Started background XCTest logs cleanup in '${tmpDir}'`);

  if (await fs.exists(logsRoot)) {
    log.info(`Cleaning test logs in '${logsRoot}' folder`);
    await iosUtils.clearLogs([logsRoot]);
    return;
  }
  log.info(`There is no ${logsRoot} folder, so not cleaning files`);
}