Skip to content

Commit

Permalink
chore: Fix typos made during refactoring (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach committed Feb 8, 2020
1 parent d5257b4 commit 973b29e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
10 changes: 10 additions & 0 deletions lib/subcommands/bootstatus.js
Expand Up @@ -5,6 +5,16 @@ import { waitForCondition } from 'asyncbox';

const commands = {};

/**
* @typedef {Object} BootMonitorOptions
* @property {?number} timeout [240000] - Simulator booting timeout in ms.
* @property {?Function} onWaitingDataMigration - This event is fired when data migration stage starts.
* @property {?Function} onWaitingSystemApp - This event is fired when system app wait stage starts.
* @property {?Function} onFinished - This event is fired when Simulator is fully booted.
* @property {?Function} onError - This event is fired when there was an error while monitoring the booting process
* or when the timeout has expired.
*/

/**
* Start monitoring for boot status of the particular Simulator.
* If onFinished property is not set then the method will block
Expand Down
2 changes: 0 additions & 2 deletions lib/subcommands/get_app_container.js
Expand Up @@ -8,8 +8,6 @@ const commands = {};
* It is required that Simulator is in _booted_ state.
*
* @param {string} bundleId - Bundle identifier of an application.
* @param {?boolean} logErrors [true] - Whether to include exec's command
* stderr output into exception message if thrown.
* @param {?string} containerType - Which container type to return. Possible values
* are 'app', 'data', 'groups', '<A specific App Group container>'.
* The default value is 'app'.
Expand Down
13 changes: 8 additions & 5 deletions lib/subcommands/launch.js
@@ -1,3 +1,4 @@
import _ from 'lodash';
import { retryInterval } from 'asyncbox';

const commands = {};
Expand All @@ -11,16 +12,18 @@ const commands = {};
* which is going to be removed.
* @param {number} tries [5] - The maximum number of retries before
* throwing an exception.
* @return {string} the actual command output
* @throws {Error} If the corresponding simctl subcommand command
* returns non-zero return code.
* @throws {Error} If the `udid` instance property is unset
*/
commands.launchApp = async function launchApp (bundleId, tries = 5) {
await retryInterval(tries, 1000,
async () => await this.exec('launch', {
args: [this.requireUdid('launch'), bundleId]
})
);
return await retryInterval(tries, 1000, async () => {
const {stdout} = await this.exec('launch', {
args: [this.requireUdid('launch'), bundleId],
});
return _.trim(stdout);
});
};

export default commands;
6 changes: 3 additions & 3 deletions lib/subcommands/spawn.js
Expand Up @@ -14,8 +14,8 @@ const commands = {};
* returns non-zero return code.
* @throws {Error} If the `udid` instance property is unset
*/
commands.spawnProcess = async function spawn (args, env = {}) {
if (_.isNil(args)) {
commands.spawnProcess = async function spawnProcess (args, env = {}) {
if (_.isEmpty(args)) {
throw new Error('Spawn arguments are required');
}

Expand All @@ -35,7 +35,7 @@ commands.spawnProcess = async function spawn (args, env = {}) {
* @throws {Error} If the `udid` instance property is unset
*/
commands.spawnSubProcess = async function spawnSubProcess (args, env = {}) {
if (_.isNil(args)) {
if (_.isEmpty(args)) {
throw new Error('Spawn arguments are required');
}

Expand Down

0 comments on commit 973b29e

Please sign in to comment.