Skip to content

Commit e96802c

Browse files
committed
chore: comments
1 parent 82b1c50 commit e96802c

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

bin/helpers/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1477,7 +1477,7 @@ async function processExitHandler(exitData){
14771477
}
14781478

14791479
async function processO11yExitHandler(exitData){
1480-
if (exitData.buildId && exitData.args && exitData.args.async) {
1480+
if (exitData.buildId) {
14811481
await printBuildLink(false);
14821482
} else {
14831483
await printBuildLink(true);

bin/testObservability/reporter/index.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -451,19 +451,25 @@ class MyReporter {
451451
if (eventType === 'TestRunFinished') {
452452
Object.values(this.hooksStarted).forEach(async hookData => {
453453
hookData['event_type'] = 'HookRunFinished';
454-
hookData['hook_run'].result = uploadData['test_run'].result;
455-
hookData['hook_run'].failure = uploadData['test_run'].failure;
456-
hookData['hook_run'].failure_type = uploadData['test_run'].failure_type;
457-
hookData['hook_run'].failure_reason = uploadData['test_run'].failure_reason;
458-
hookData['hook_run'].failure_reason_expanded = uploadData['test_run'].failure_reason_expanded;
459-
hookData['hook_run'].failure_backtrace = uploadData['test_run'].failure_backtrace;
454+
hookData['hook_run'] = {
455+
...hookData['hook_run'],
456+
result: uploadData['test_run'].result,
457+
failure: uploadData['test_run'].failure,
458+
failure_type: uploadData['test_run'].failure_type,
459+
failure_reason: uploadData['test_run'].failure_reason,
460+
failure_reason_expanded: uploadData['test_run'].failure_reason_expanded,
461+
failure_backtrace: uploadData['test_run'].failure_backtrace
462+
463+
}
464+
460465
if (hookData['hook_run']['hook_type'] === 'BEFORE_ALL') {
461466
hookData['hook_run'].finished_at = uploadData['test_run'].finished_at;
462467
hookData['hook_run'].duration_in_ms = new Date(hookData['hook_run'].finished_at).getTime() - new Date(hookData['hook_run'].started_at).getTime();
463468
} else {
464469
hookData['hook_run'].finished_at = hookData['hook_run'].started_at;
465470
hookData['hook_run'].duration_in_ms = 0;
466471
}
472+
console.log(hookData);
467473
await uploadEventData(hookData);
468474
})
469475
this.hooksStarted = {};

0 commit comments

Comments
 (0)