MCPcopy Create free account
hub / github.com/TestSprite/testsprite-cli / buildMeta

Function buildMeta

src/lib/bundle.ts:355–369  ·  view source on GitHub ↗
(ctx: CliFailureContext, fetchedAt: Date = new Date())

Source from the content-addressed store, hash-verified

353 * lets specs assert the meta shape without touching disk.
354 */
355export function buildMeta(ctx: CliFailureContext, fetchedAt: Date = new Date()): BundleMeta {
356 return {
357 schemaVersion: BUNDLE_SCHEMA_VERSION,
358 snapshotId: ctx.snapshotId,
359 testId: ctx.testId,
360 projectId: ctx.projectId,
361 codeVersion: ctx.code.codeVersion ?? ctx.result.codeVersion ?? null,
362 runIdIfAvailable: ctx.result.runIdIfAvailable,
363 targetUrl: ctx.result.targetUrl,
364 failedStepIndex: ctx.result.failedStepIndex,
365 failureKind: ctx.result.failureKind,
366 capturedAt: ctx.result.finishedAt,
367 fetchedAt: fetchedAt.toISOString(),
368 };
369}
370
371/**
372 * Top-level bundle writer. The order matters:

Callers 3

runArtifactGetFunction · 0.85
writeBundleFunction · 0.85
bundle.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected