chore: do not store empty step.attachments[] in trace
This commit is contained in:
parent
a1451c75f8
commit
5141297771
|
|
@ -256,7 +256,7 @@ export class TeleReporterEmitter implements ReporterV2 {
|
|||
id: (step as any)[this._idSymbol],
|
||||
duration: step.duration,
|
||||
error: step.error,
|
||||
attachments: step.attachments.map(a => result.attachments.indexOf(a)),
|
||||
attachments: step.attachments.length ? step.attachments.map(a => result.attachments.indexOf(a)) : undefined,
|
||||
annotations: step.annotations.length ? step.annotations : undefined,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -278,6 +278,8 @@ export class TestTracing {
|
|||
}
|
||||
|
||||
function serializeAttachments(attachments: Attachment[]): trace.AfterActionTraceEvent['attachments'] {
|
||||
if (attachments.length === 0)
|
||||
return undefined;
|
||||
return attachments.filter(a => a.name !== 'trace').map(a => {
|
||||
return {
|
||||
name: a.name,
|
||||
|
|
|
|||
Loading…
Reference in a new issue