Skip to content

Commit aa8270a

Browse files
format
1 parent 7af1f7b commit aa8270a

3 files changed

Lines changed: 20 additions & 27 deletions

File tree

lib/utils.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,10 +409,7 @@ function mergeObjects<T extends Record<string, any>, U extends Record<string, an
409409
const output: Record<string, any> = {...target};
410410
for (const [key, sourceValue] of Object.entries(source)) {
411411
const targetValue = output[key];
412-
if (
413-
isPlainObject(targetValue) &&
414-
isPlainObject(sourceValue)
415-
) {
412+
if (isPlainObject(targetValue) && isPlainObject(sourceValue)) {
416413
output[key] = mergeObjects(targetValue, sourceValue);
417414
continue;
418415
}

lib/xcodebuild.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ export class XcodeBuild {
119119

120120
this.mjpegServerPort = args.mjpegServerPort;
121121

122-
this.prebuildDelay = typeof args.prebuildDelay === 'number' ? args.prebuildDelay : PREBUILD_DELAY;
122+
this.prebuildDelay =
123+
typeof args.prebuildDelay === 'number' ? args.prebuildDelay : PREBUILD_DELAY;
123124

124125
this.allowProvisioningDeviceRegistration = args.allowProvisioningDeviceRegistration;
125126

@@ -415,9 +416,10 @@ export class XcodeBuild {
415416
});
416417

417418
let logXcodeOutput = !!this.showXcodeLog;
418-
const logMsg = typeof this.showXcodeLog === 'boolean'
419-
? `Output from xcodebuild ${this.showXcodeLog ? 'will' : 'will not'} be logged`
420-
: 'Output from xcodebuild will only be logged if any errors are present there';
419+
const logMsg =
420+
typeof this.showXcodeLog === 'boolean'
421+
? `Output from xcodebuild ${this.showXcodeLog ? 'will' : 'will not'} be logged`
422+
: 'Output from xcodebuild will only be logged if any errors are present there';
421423
this.log.debug(`${logMsg}. To change this, use 'showXcodeLog' desired capability`);
422424

423425
const onStreamLine = (line: string) => {

test/unit/webdriveragent-specs.ts

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,33 +33,27 @@ describe('WebDriverAgent', function () {
3333
expect(agent.agentPath).to.eql(defaultAgentPath);
3434
});
3535
it('should have custom wda bootstrap and default agent if only bootstrap specified', function () {
36-
const agent = new WebDriverAgent(
37-
{
38-
...fakeConstructorArgs,
39-
bootstrapPath: customBootstrapPath,
40-
},
41-
);
36+
const agent = new WebDriverAgent({
37+
...fakeConstructorArgs,
38+
bootstrapPath: customBootstrapPath,
39+
});
4240
expect(agent.bootstrapPath).to.eql(customBootstrapPath);
4341
expect(agent.agentPath).to.eql(path.resolve(customBootstrapPath, 'WebDriverAgent.xcodeproj'));
4442
});
4543
it('should have custom wda bootstrap and agent if both specified', function () {
46-
const agent = new WebDriverAgent(
47-
{
48-
...fakeConstructorArgs,
49-
bootstrapPath: customBootstrapPath,
50-
agentPath: customAgentPath,
51-
},
52-
);
44+
const agent = new WebDriverAgent({
45+
...fakeConstructorArgs,
46+
bootstrapPath: customBootstrapPath,
47+
agentPath: customAgentPath,
48+
});
5349
expect(agent.bootstrapPath).to.eql(customBootstrapPath);
5450
expect(agent.agentPath).to.eql(customAgentPath);
5551
});
5652
it('should have custom derivedDataPath if specified', function () {
57-
const agent = new WebDriverAgent(
58-
{
59-
...fakeConstructorArgs,
60-
derivedDataPath: customDerivedDataPath,
61-
},
62-
);
53+
const agent = new WebDriverAgent({
54+
...fakeConstructorArgs,
55+
derivedDataPath: customDerivedDataPath,
56+
});
6357
if (agent.xcodebuild) {
6458
expect(agent.xcodebuild.derivedDataPath).to.eql(customDerivedDataPath);
6559
}

0 commit comments

Comments
 (0)