executable-stories-formatters 0.6.2 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { S as StoryMeta, C as CIInfo$1, a as StoryStep, D as DocEntry, R as RawStatus, b as RawAttachment, c as RawRun, d as CIProvider, e as RawCIInfo, f as adaptJestRun, g as adaptPlaywrightRun, h as adaptVitestRun } from './index-C4QO-SVT.js';
2
- export { i as DocPhase, J as JestAdapterOptions, j as JestAggregatedResult, k as JestFileResult, l as JestTestResult, O as OtelAttributeValue, m as OtelSpan, P as PlaywrightAdapterOptions, n as PlaywrightAnnotation, o as PlaywrightAttachment, p as PlaywrightError, q as PlaywrightLocation, r as PlaywrightStatus, s as PlaywrightTestCase, t as PlaywrightTestResult, u as RawStepEvent, v as RawTestCase, w as STORY_META_KEY, x as StepKeyword, y as StepMode, z as StoryFileReport, V as VitestAdapterOptions, A as VitestSerializedError, B as VitestState, E as VitestTestCase, F as VitestTestModule, G as VitestTestResult, H as toCIInfo, I as toRawCIInfo } from './index-C4QO-SVT.js';
1
+ import { S as StoryMeta, C as CIInfo$1, a as StoryStep, D as DocEntry, N as NormalizedTicket, O as OtelSpan, b as CIProvider, R as RawStatus, c as RawAttachment, d as RawRun, e as RawCIInfo, f as adaptJestRun, g as adaptPlaywrightRun, h as adaptVitestRun } from './index-C0OOaaiK.js';
2
+ export { i as DocPhase, J as JestAdapterOptions, j as JestAggregatedResult, k as JestFileResult, l as JestTestResult, m as OtelAttributeValue, P as PlaywrightAdapterOptions, n as PlaywrightAnnotation, o as PlaywrightAttachment, p as PlaywrightError, q as PlaywrightLocation, r as PlaywrightStatus, s as PlaywrightTestCase, t as PlaywrightTestResult, u as RawStepEvent, v as RawTestCase, w as STORY_META_KEY, x as StepKeyword, y as StepMode, z as StoryFileReport, V as VitestAdapterOptions, A as VitestSerializedError, B as VitestState, E as VitestTestCase, F as VitestTestModule, G as VitestTestResult, H as toCIInfo, I as toRawCIInfo } from './index-C0OOaaiK.js';
3
3
 
4
4
  /**
5
5
  * Canonical types for Layer 2: Anti-Corruption Layer output.
@@ -201,6 +201,8 @@ interface CanonicalizeOptions {
201
201
  }
202
202
  /** Output format for report generation */
203
203
  type OutputFormat = "cucumber-json" | "cucumber-messages" | "cucumber-html" | "html" | "junit" | "markdown";
204
+ /** Sort order for test cases in reports (deterministic for diff-friendly output) */
205
+ type SortTestCasesMode = "id" | "source" | "none";
204
206
  /** Output mode for report routing */
205
207
  type OutputMode = "aggregated" | "colocated";
206
208
  /** Colocated output style */
@@ -243,12 +245,20 @@ interface FormatterOptions {
243
245
  include?: string[];
244
246
  /** Glob patterns to exclude test cases by sourceFile (forward slashes). Applied after include. */
245
247
  exclude?: string[];
248
+ /** Tags to include test cases (any match). If empty, all are considered. */
249
+ includeTags?: string[];
250
+ /** Tags to exclude test cases (any match). Applied after includeTags. */
251
+ excludeTags?: string[];
246
252
  /** Output formats to generate. Default: ["cucumber-json"] */
247
253
  formats?: OutputFormat[];
248
254
  /** Output directory for generated reports. Default: "reports" */
249
255
  outputDir?: string;
250
256
  /** Base filename (without extension). Default: "test-results" */
251
257
  outputName?: string;
258
+ /** Append run timestamp (UTC seconds) to output filename for before/after diffs. Default: false */
259
+ outputNameTimestamp?: boolean;
260
+ /** Sort test cases deterministically so report content order is stable across runs. Default: "none" */
261
+ sortTestCases?: SortTestCasesMode;
252
262
  /** Output routing configuration */
253
263
  output?: OutputConfig;
254
264
  /** Cucumber JSON specific options */
@@ -274,6 +284,12 @@ interface FormatterOptions {
274
284
  mermaidEnabled?: boolean;
275
285
  /** Enable Markdown parsing for section doc entries (via marked.js CDN). Default: true */
276
286
  markdownEnabled?: boolean;
287
+ /** Base URL for source permalinks. E.g., "https://github.com/user/repo/blob/main" */
288
+ permalinkBaseUrl?: string;
289
+ /** URL template for ticket links. Use {ticket} as placeholder. E.g., "https://jira.example.com/browse/{ticket}" */
290
+ ticketUrlTemplate?: string;
291
+ /** Theme name. Default: "default". Available: default, corporate, terminal, minimal, dashboard, playful */
292
+ theme?: string;
277
293
  };
278
294
  /** JUnit XML specific options */
279
295
  junit?: {
@@ -320,6 +336,10 @@ interface FormatterOptions {
320
336
  /** Generic webhook configurations */
321
337
  webhooks?: GenericWebhookNotifierOptions[];
322
338
  };
339
+ /** Asset bundling mode. "none" = no asset copying, "copy" = copy referenced assets next to HTML. Default: "none" */
340
+ assetMode?: "none" | "copy";
341
+ /** When true, warn on missing assets instead of throwing. Default: false */
342
+ allowMissingAssets?: boolean;
323
343
  /** Logger for warnings and info. Default: console */
324
344
  logger?: Logger;
325
345
  /** File writer function. Default: fs.promises.writeFile */
@@ -376,9 +396,13 @@ interface MarkdownRenderers {
376
396
  interface ResolvedFormatterOptions {
377
397
  include: string[];
378
398
  exclude: string[];
399
+ includeTags: string[];
400
+ excludeTags: string[];
379
401
  formats: OutputFormat[];
380
402
  outputDir: string;
381
403
  outputName: string;
404
+ outputNameTimestamp: boolean;
405
+ sortTestCases: SortTestCasesMode;
382
406
  output: {
383
407
  mode: OutputMode;
384
408
  colocatedStyle: ColocatedStyle;
@@ -406,6 +430,9 @@ interface ResolvedFormatterOptions {
406
430
  syntaxHighlighting: boolean;
407
431
  mermaidEnabled: boolean;
408
432
  markdownEnabled: boolean;
433
+ permalinkBaseUrl?: string;
434
+ ticketUrlTemplate?: string;
435
+ theme: string;
409
436
  };
410
437
  junit: {
411
438
  suiteName: string;
@@ -429,6 +456,69 @@ interface ResolvedFormatterOptions {
429
456
  includeSourceLinks: boolean;
430
457
  customRenderers?: MarkdownRenderers;
431
458
  };
459
+ assetMode: "none" | "copy";
460
+ allowMissingAssets: boolean;
461
+ }
462
+
463
+ type ScenarioChangeKind = "added" | "removed" | "regressed" | "fixed" | "changed" | "unchanged";
464
+ interface ScenarioChangeFlags {
465
+ status: boolean;
466
+ steps: boolean;
467
+ docs: boolean;
468
+ tags: boolean;
469
+ tickets: boolean;
470
+ source: boolean;
471
+ duration: boolean;
472
+ attachments: boolean;
473
+ error: boolean;
474
+ titlePath: boolean;
475
+ }
476
+ interface ScenarioSnapshot {
477
+ id: string;
478
+ scenario: string;
479
+ sourceFile: string;
480
+ sourceLine: number;
481
+ status: TestStatus;
482
+ durationMs: number;
483
+ tags: string[];
484
+ titlePath: string[];
485
+ steps: StoryStep[];
486
+ docs: DocEntry[];
487
+ tickets: NormalizedTicket[];
488
+ attachments: Attachment[];
489
+ errorMessage?: string;
490
+ }
491
+ interface ScenarioDiff {
492
+ kind: ScenarioChangeKind;
493
+ id: string;
494
+ scenario: string;
495
+ sourceFile: string;
496
+ sourceLine: number;
497
+ baseline?: ScenarioSnapshot;
498
+ current?: ScenarioSnapshot;
499
+ flags: ScenarioChangeFlags;
500
+ changedFields: string[];
501
+ durationDeltaMs?: number;
502
+ }
503
+ interface RunDiffSummary {
504
+ totalBaseline: number;
505
+ totalCurrent: number;
506
+ added: number;
507
+ removed: number;
508
+ changed: number;
509
+ regressed: number;
510
+ fixed: number;
511
+ unchanged: number;
512
+ }
513
+ interface RunDiffResult {
514
+ baseline: TestRunResult;
515
+ current: TestRunResult;
516
+ summary: RunDiffSummary;
517
+ scenarios: ScenarioDiff[];
518
+ }
519
+ type CompareFormat = "html" | "markdown";
520
+ interface CompareFormatterOptions {
521
+ title?: string;
432
522
  }
433
523
 
434
524
  /**
@@ -536,6 +626,249 @@ interface IJsonFeature {
536
626
  uri: string;
537
627
  }
538
628
 
629
+ /**
630
+ * Render an OTel trace waterfall (fn(args, deps)).
631
+ */
632
+
633
+ interface RenderTraceViewArgs {
634
+ spans: OtelSpan[] | undefined;
635
+ }
636
+ interface RenderTraceViewDeps {
637
+ escapeHtml: (str: string) => string;
638
+ }
639
+
640
+ /**
641
+ * Render attachments section (fn(args, deps)).
642
+ */
643
+
644
+ interface RenderAttachmentsArgs {
645
+ attachments: Attachment[];
646
+ }
647
+ interface RenderAttachmentsDeps {
648
+ escapeHtml: (str: string) => string;
649
+ embedScreenshots: boolean;
650
+ }
651
+
652
+ /**
653
+ * Render error box (fn(args, deps)).
654
+ */
655
+ interface RenderErrorBoxArgs {
656
+ message: string;
657
+ stack?: string;
658
+ }
659
+ interface RenderErrorBoxDeps {
660
+ escapeHtml: (str: string) => string;
661
+ }
662
+
663
+ interface RenderStepsArgs {
664
+ steps: StoryStep[];
665
+ stepResults: StepResult[];
666
+ }
667
+ interface RenderStepsDeps {
668
+ escapeHtml: (str: string) => string;
669
+ getStatusIcon: (status: TestStatus) => string;
670
+ renderDocs: (docs: DocEntry[] | undefined, containerClass: string) => string;
671
+ highlightStepParams?: (text: string) => string;
672
+ }
673
+
674
+ /**
675
+ * Types for history tracking and test metrics.
676
+ */
677
+
678
+ interface HistoryEntry {
679
+ runId: string;
680
+ timestamp: number;
681
+ status: "passed" | "failed" | "skipped" | "pending";
682
+ durationMs: number;
683
+ ci?: {
684
+ provider?: CIProvider;
685
+ branch?: string;
686
+ commitSha?: string;
687
+ };
688
+ }
689
+ interface TestHistory {
690
+ testId: string;
691
+ testName: string;
692
+ sourceFile: string;
693
+ sourceLine?: number;
694
+ entries: HistoryEntry[];
695
+ }
696
+ interface HistoryStore {
697
+ version: 1;
698
+ maxRuns: number;
699
+ tests: Record<string, TestHistory>;
700
+ lastUpdated: number;
701
+ }
702
+ type StabilityGrade = "A" | "B" | "C" | "D" | "F";
703
+ type FlakinessLevel = "stable" | "unstable" | "flaky";
704
+ type PerformanceTrend = "improving" | "stable" | "regressing";
705
+ interface TestMetrics {
706
+ testId: string;
707
+ flakinessLevel: FlakinessLevel;
708
+ flakinessScore: number;
709
+ failureRate: number;
710
+ stabilityGrade: StabilityGrade;
711
+ performanceTrend: PerformanceTrend;
712
+ avgDurationMs: number;
713
+ passRate: number;
714
+ longestPassStreak: number;
715
+ consecutiveFailures: number;
716
+ sampleSize: number;
717
+ }
718
+
719
+ interface RenderScenarioArgs {
720
+ tc: TestCaseResult;
721
+ metrics?: TestMetrics;
722
+ }
723
+ interface RenderScenarioDeps {
724
+ escapeHtml: (str: string) => string;
725
+ getStatusIcon: (status: TestStatus) => string;
726
+ startCollapsed: boolean;
727
+ renderSteps: (args: RenderStepsArgs, deps: RenderStepsDeps) => string;
728
+ renderDocs: (docs: DocEntry[] | undefined, containerClass: string) => string;
729
+ renderErrorBox: (args: RenderErrorBoxArgs, deps: RenderErrorBoxDeps) => string;
730
+ renderAttachments: (args: RenderAttachmentsArgs, deps: RenderAttachmentsDeps) => string;
731
+ renderTraceView: (args: RenderTraceViewArgs, deps: RenderTraceViewDeps) => string;
732
+ embedScreenshots: boolean;
733
+ permalinkBaseUrl?: string;
734
+ ticketUrlTemplate?: string;
735
+ }
736
+
737
+ interface RenderFeatureArgs {
738
+ file: string;
739
+ testCases: TestCaseResult[];
740
+ metricsMap?: Map<string, TestMetrics>;
741
+ }
742
+ interface RenderFeatureDeps {
743
+ escapeHtml: (str: string) => string;
744
+ startCollapsed: boolean;
745
+ renderScenario: (args: RenderScenarioArgs, deps: RenderScenarioDeps) => string;
746
+ scenarioDeps: RenderScenarioDeps;
747
+ }
748
+
749
+ /**
750
+ * Render summary cards section (fn(args, deps)).
751
+ * No deps: pure counts to HTML.
752
+ */
753
+ interface RenderSummaryArgs {
754
+ total: number;
755
+ passed: number;
756
+ failed: number;
757
+ skipped: number;
758
+ }
759
+ interface RenderSummaryDeps {
760
+ }
761
+
762
+ /**
763
+ * Render meta info section (fn(args, deps)).
764
+ */
765
+ interface RenderMetaInfoArgs {
766
+ startedAtMs: number;
767
+ durationMs: number;
768
+ packageVersion?: string;
769
+ gitSha?: string;
770
+ ciName?: string;
771
+ ciBranch?: string;
772
+ ciUrl?: string;
773
+ ciCommitSha?: string;
774
+ ciBuildNumber?: string;
775
+ }
776
+ interface RenderMetaInfoDeps {
777
+ escapeHtml: (str: string) => string;
778
+ }
779
+
780
+ /**
781
+ * Render tag filter bar (fn(args, deps)).
782
+ * Displays a collapsible tag bar with clickable tag pills for filtering scenarios,
783
+ * ARIA attributes for accessibility, and a results counter.
784
+ */
785
+ interface RenderTagBarArgs {
786
+ tags: string[];
787
+ totalScenarios: number;
788
+ }
789
+ interface RenderTagBarDeps {
790
+ escapeHtml: (str: string) => string;
791
+ }
792
+
793
+ /**
794
+ * Render failure summary block with deep links to failed scenarios (fn(args, deps)).
795
+ */
796
+
797
+ interface RenderFailureSummaryArgs {
798
+ failedCases: TestCaseResult[];
799
+ }
800
+ interface RenderFailureSummaryDeps {
801
+ escapeHtml: (str: string) => string;
802
+ }
803
+
804
+ interface BuildBodyArgs {
805
+ run: TestRunResult;
806
+ metricsMap?: Map<string, TestMetrics>;
807
+ }
808
+ interface BuildBodyDeps {
809
+ renderMetaInfo: (args: RenderMetaInfoArgs, deps: RenderMetaInfoDeps) => string;
810
+ renderSummary: (args: RenderSummaryArgs, deps: RenderSummaryDeps) => string;
811
+ renderTagBar: (args: RenderTagBarArgs, deps: RenderTagBarDeps) => string;
812
+ renderFeature: (args: RenderFeatureArgs, deps: RenderFeatureDeps) => string;
813
+ renderFailureSummary: (args: RenderFailureSummaryArgs, deps: RenderFailureSummaryDeps) => string;
814
+ metaDeps: RenderMetaInfoDeps;
815
+ summaryDeps: RenderSummaryDeps;
816
+ tagBarDeps: RenderTagBarDeps;
817
+ featureDeps: RenderFeatureDeps;
818
+ failureSummaryDeps: RenderFailureSummaryDeps;
819
+ }
820
+
821
+ /**
822
+ * HTML Report Template.
823
+ *
824
+ * Generates the JavaScript for interactivity (theme toggle, search, collapse).
825
+ */
826
+ /** Options for HTML template generation */
827
+ interface HtmlTemplateOptions {
828
+ includeSearch?: boolean;
829
+ includeDarkMode?: boolean;
830
+ syntaxHighlighting?: boolean;
831
+ mermaidEnabled?: boolean;
832
+ markdownEnabled?: boolean;
833
+ /** Additional inline JS injected after core JS (used by themes). */
834
+ additionalJs?: string;
835
+ /** Additional ESM import statements for CDN libraries (used by themes). */
836
+ additionalImports?: string[];
837
+ }
838
+
839
+ /**
840
+ * HTML theme type definitions.
841
+ */
842
+
843
+ /** Built-in theme names */
844
+ type HtmlThemeName = "default" | "corporate" | "terminal" | "minimal" | "dashboard" | "playful";
845
+ /** A theme definition */
846
+ interface HtmlTheme {
847
+ /** Theme identifier */
848
+ name: string;
849
+ /** Display label */
850
+ label: string;
851
+ /** Full CSS string (replaces CSS_STYLES). Must define all custom properties for both light and dark modes. */
852
+ css: string;
853
+ /** Optional: override body rendering. Receives the same (args, deps) as buildBody. */
854
+ buildBody?: (args: BuildBodyArgs, deps: BuildBodyDeps) => string;
855
+ /** Optional: override the HTML template wrapper. */
856
+ generateTemplate?: (title: string, styles: string, body: string, options: HtmlTemplateOptions) => string;
857
+ /** Optional: additional inline JS injected after core JS. */
858
+ additionalJs?: string;
859
+ /** Optional: additional ESM import statements for CDN libraries. */
860
+ additionalImports?: string[];
861
+ }
862
+
863
+ /**
864
+ * Theme registry — resolves theme names to theme objects.
865
+ */
866
+
867
+ /** Resolve a theme by name or pass through a custom theme object. */
868
+ declare function resolveTheme(nameOrTheme: string | HtmlTheme): HtmlTheme;
869
+ /** List available built-in theme names. */
870
+ declare function getAvailableThemes(): string[];
871
+
539
872
  /**
540
873
  * Status mapping from raw framework statuses to canonical TestStatus.
541
874
  */
@@ -809,51 +1142,6 @@ declare class CucumberJsonFormatter {
809
1142
  private docEntryToArgument;
810
1143
  }
811
1144
 
812
- /**
813
- * Types for history tracking and test metrics.
814
- */
815
-
816
- interface HistoryEntry {
817
- runId: string;
818
- timestamp: number;
819
- status: "passed" | "failed" | "skipped" | "pending";
820
- durationMs: number;
821
- ci?: {
822
- provider?: CIProvider;
823
- branch?: string;
824
- commitSha?: string;
825
- };
826
- }
827
- interface TestHistory {
828
- testId: string;
829
- testName: string;
830
- sourceFile: string;
831
- sourceLine?: number;
832
- entries: HistoryEntry[];
833
- }
834
- interface HistoryStore {
835
- version: 1;
836
- maxRuns: number;
837
- tests: Record<string, TestHistory>;
838
- lastUpdated: number;
839
- }
840
- type StabilityGrade = "A" | "B" | "C" | "D" | "F";
841
- type FlakinessLevel = "stable" | "unstable" | "flaky";
842
- type PerformanceTrend = "improving" | "stable" | "regressing";
843
- interface TestMetrics {
844
- testId: string;
845
- flakinessLevel: FlakinessLevel;
846
- flakinessScore: number;
847
- failureRate: number;
848
- stabilityGrade: StabilityGrade;
849
- performanceTrend: PerformanceTrend;
850
- avgDurationMs: number;
851
- passRate: number;
852
- longestPassStreak: number;
853
- consecutiveFailures: number;
854
- sampleSize: number;
855
- }
856
-
857
1145
  /**
858
1146
  * HTML Formatter - Layer 3.
859
1147
  *
@@ -879,6 +1167,12 @@ interface HtmlOptions {
879
1167
  mermaidEnabled?: boolean;
880
1168
  /** Enable Markdown parsing for section doc entries (via marked.js CDN). Default: true */
881
1169
  markdownEnabled?: boolean;
1170
+ /** Base URL for source permalinks. E.g., "https://github.com/user/repo/blob/main" */
1171
+ permalinkBaseUrl?: string;
1172
+ /** URL template for ticket links. Use {ticket} as placeholder. E.g., "https://jira.example.com/browse/{ticket}" */
1173
+ ticketUrlTemplate?: string;
1174
+ /** Theme name or custom theme object. Default: "default" */
1175
+ theme?: string | HtmlTheme;
882
1176
  }
883
1177
  /**
884
1178
  * HTML Formatter.
@@ -1386,6 +1680,30 @@ declare class CucumberHtmlFormatter {
1386
1680
  formatToString(run: TestRunResult): Promise<string>;
1387
1681
  }
1388
1682
 
1683
+ interface RunDiffHtmlOptions {
1684
+ title?: string;
1685
+ /** Theme name or custom theme object. Default: "default" */
1686
+ theme?: string | HtmlTheme;
1687
+ /** Enable dark mode toggle. Default: true */
1688
+ darkMode?: boolean;
1689
+ }
1690
+ declare class RunDiffHtmlFormatter {
1691
+ private title;
1692
+ private theme;
1693
+ private darkMode;
1694
+ constructor(options?: RunDiffHtmlOptions);
1695
+ format(diff: RunDiffResult): string;
1696
+ }
1697
+
1698
+ interface RunDiffMarkdownOptions {
1699
+ title?: string;
1700
+ }
1701
+ declare class RunDiffMarkdownFormatter {
1702
+ private title;
1703
+ constructor(options?: RunDiffMarkdownOptions);
1704
+ format(diff: RunDiffResult): string;
1705
+ }
1706
+
1389
1707
  /**
1390
1708
  * NDJSON-to-TestRunResult parser.
1391
1709
  *
@@ -1800,6 +2118,40 @@ declare const MIN_FLAKINESS_SAMPLES = 3;
1800
2118
  /** Check whether an array meets the minimum sample threshold. */
1801
2119
  declare function hasSufficientHistory(entries: unknown[], min: number): boolean;
1802
2120
 
2121
+ /**
2122
+ * List scenarios from a test run (fn(args, deps) pattern).
2123
+ * Produces text table or JSON output.
2124
+ */
2125
+
2126
+ interface ListScenariosArgs {
2127
+ testCases: TestCaseResult[];
2128
+ format: "text" | "json";
2129
+ }
2130
+ type ListScenariosDeps = Record<string, never>;
2131
+ declare function listScenarios(args: ListScenariosArgs, _deps: ListScenariosDeps): string;
2132
+
2133
+ declare function createPrCommentSummary(diff: RunDiffResult, maxScenarios?: number): string;
2134
+
2135
+ declare function diffRuns(baseline: TestRunResult, current: TestRunResult): RunDiffResult;
2136
+
2137
+ interface BundleOptions {
2138
+ /** If true, warn about missing assets instead of throwing. Default: false. */
2139
+ allowMissing?: boolean;
2140
+ }
2141
+ interface BundleResult {
2142
+ /** Number of assets successfully copied */
2143
+ copiedCount: number;
2144
+ /** Number of missing assets */
2145
+ missingCount: number;
2146
+ /** Paths of missing assets (original references) */
2147
+ missing: string[];
2148
+ }
2149
+ /**
2150
+ * Post-process an HTML report file: copy referenced local assets into
2151
+ * an `assets/` directory beside it and rewrite paths in the HTML.
2152
+ */
2153
+ declare function bundleAssets(htmlPath: string, options?: BundleOptions): BundleResult;
2154
+
1803
2155
  /**
1804
2156
  * @executable-stories/formatters
1805
2157
  *
@@ -1828,6 +2180,10 @@ interface GenerateDeps {
1828
2180
  }
1829
2181
  /** Result of generate function: Map of format to array of file paths */
1830
2182
  type GenerateResult = Map<OutputFormat, string[]>;
2183
+ interface GenerateCompareResult {
2184
+ files: string[];
2185
+ diff: RunDiffResult;
2186
+ }
1831
2187
  /**
1832
2188
  * High-level report generator that combines multiple formatters.
1833
2189
  *
@@ -1869,6 +2225,14 @@ declare class ReportGenerator {
1869
2225
  * Useful for testing and custom configurations.
1870
2226
  */
1871
2227
  declare function createReportGenerator(options?: FormatterOptions, deps?: Partial<GenerateDeps>): ReportGenerator;
2228
+ declare function generateRunComparison(args: {
2229
+ baseline: TestRunResult;
2230
+ current: TestRunResult;
2231
+ formats: Array<"html" | "markdown">;
2232
+ outputDir?: string;
2233
+ outputName?: string;
2234
+ title?: string;
2235
+ }): Promise<GenerateCompareResult>;
1872
2236
 
1873
2237
  /**
1874
2238
  * Normalize Jest results to canonical TestRunResult.
@@ -1889,4 +2253,4 @@ declare function normalizeVitestResults(testModules: Parameters<typeof adaptVite
1889
2253
  */
1890
2254
  declare function normalizePlaywrightResults(testResults: Parameters<typeof adaptPlaywrightRun>[0], adapterOptions?: Parameters<typeof adaptPlaywrightRun>[1], canonicalizeOptions?: CanonicalizeOptions): TestRunResult;
1891
2255
 
1892
- export { type Attachment, type CIInfo, CIProvider, type CanonicalizeOptions, type ColocatedStyle, type CoverageSummary, CucumberHtmlFormatter, type CucumberHtmlOptions, CucumberJsonFormatter, type CucumberJsonOptions, CucumberMessagesFormatter, type CucumberMessagesOptions, DocEntry, type FlakinessLevel, type FormatterOptions, type GenerateArgs, type GenerateDeps, type GenerateResult, type GenericWebhookNotifierOptions, type HistoryEntry, type HistoryStore, HtmlFormatter, type HtmlOptions, type IJsonDataTable, type IJsonDocString, type IJsonEmbedding, type IJsonFeature, type IJsonScenario, type IJsonStep, type IJsonStepArgument, type IJsonStepResult, type IJsonTableRow, type IJsonTag, JUnitFormatter, type JUnitOptions, type Logger, MIN_FLAKINESS_SAMPLES, MIN_METRIC_SAMPLES, MIN_PERF_SAMPLES, MarkdownFormatter, type MarkdownFormatterOptions, type MarkdownOptions, type MarkdownRenderers, type NotificationSummary, type NotifyCondition, type OtelTraceContext, type OutputConfig, type OutputFormat, type OutputMode, type OutputRule, type PerformanceTrend, RawAttachment, RawCIInfo, RawRun, RawStatus, ReportGenerator, type ResolvedFormatterOptions, type StabilityGrade, type StepResult, StoryMeta, StoryStep, type TestCaseAttempt, type TestCaseResult, type TestHistory, type TestMetrics, type TestRunResult, type TestStatus, CIInfo$1 as TypedCIInfo, type ValidationResult, type WebhookPayload, type WebhookSignerHmac, type WriteFile, adaptJestRun, adaptPlaywrightRun, adaptVitestRun, assertValidRun, calculateFlakiness, calculateStability, canonicalizeRun, clearVersionCache, computeTestMetrics, createReportGenerator, deriveStepResults, detectCI, detectPerformanceTrend, findGitDir, formatDuration, generateRunId, generateTestCaseId, hasSufficientHistory, loadHistory, mergeStepResults, msToNanoseconds, nanosecondsToMs, normalizeJestResults, normalizePlaywrightResults, normalizeStatus, normalizeVitestResults, parseEnvelopes, parseNdjson, readBranchName, readGitSha, readPackageVersion, resolveAttachment, resolveAttachments, resolveTraceUrl, saveHistory, sendNotifications, sendSlackNotification, sendTeamsNotification, sendWebhookNotification, signBody, slugify, stripAnsi, tryGetActiveOtelContext, updateHistory, validateCanonicalRun };
2256
+ export { type Attachment, type BundleOptions, type BundleResult, type CIInfo, CIProvider, type CanonicalizeOptions, type ColocatedStyle, type CompareFormat, type CompareFormatterOptions, type CoverageSummary, CucumberHtmlFormatter, type CucumberHtmlOptions, CucumberJsonFormatter, type CucumberJsonOptions, CucumberMessagesFormatter, type CucumberMessagesOptions, DocEntry, type FlakinessLevel, type FormatterOptions, type GenerateArgs, type GenerateCompareResult, type GenerateDeps, type GenerateResult, type GenericWebhookNotifierOptions, type HistoryEntry, type HistoryStore, HtmlFormatter, type HtmlOptions, type HtmlTheme, type HtmlThemeName, type IJsonDataTable, type IJsonDocString, type IJsonEmbedding, type IJsonFeature, type IJsonScenario, type IJsonStep, type IJsonStepArgument, type IJsonStepResult, type IJsonTableRow, type IJsonTag, JUnitFormatter, type JUnitOptions, type ListScenariosArgs, type ListScenariosDeps, type Logger, MIN_FLAKINESS_SAMPLES, MIN_METRIC_SAMPLES, MIN_PERF_SAMPLES, MarkdownFormatter, type MarkdownFormatterOptions, type MarkdownOptions, type MarkdownRenderers, NormalizedTicket, type NotificationSummary, type NotifyCondition, OtelSpan, type OtelTraceContext, type OutputConfig, type OutputFormat, type OutputMode, type OutputRule, type PerformanceTrend, RawAttachment, RawCIInfo, RawRun, RawStatus, ReportGenerator, type ResolvedFormatterOptions, RunDiffHtmlFormatter, type RunDiffHtmlOptions, RunDiffMarkdownFormatter, type RunDiffMarkdownOptions, type RunDiffResult, type RunDiffSummary, type ScenarioChangeFlags, type ScenarioChangeKind, type ScenarioDiff, type ScenarioSnapshot, type SortTestCasesMode, type StabilityGrade, type StepResult, StoryMeta, StoryStep, type TestCaseAttempt, type TestCaseResult, type TestHistory, type TestMetrics, type TestRunResult, type TestStatus, CIInfo$1 as TypedCIInfo, type ValidationResult, type WebhookPayload, type WebhookSignerHmac, type WriteFile, adaptJestRun, adaptPlaywrightRun, adaptVitestRun, assertValidRun, bundleAssets, calculateFlakiness, calculateStability, canonicalizeRun, clearVersionCache, computeTestMetrics, createPrCommentSummary, createReportGenerator, deriveStepResults, detectCI, detectPerformanceTrend, diffRuns, findGitDir, formatDuration, generateRunComparison, generateRunId, generateTestCaseId, getAvailableThemes, hasSufficientHistory, listScenarios, loadHistory, mergeStepResults, msToNanoseconds, nanosecondsToMs, normalizeJestResults, normalizePlaywrightResults, normalizeStatus, normalizeVitestResults, parseEnvelopes, parseNdjson, readBranchName, readGitSha, readPackageVersion, resolveAttachment, resolveAttachments, resolveTheme, resolveTraceUrl, saveHistory, sendNotifications, sendSlackNotification, sendTeamsNotification, sendWebhookNotification, signBody, slugify, stripAnsi, tryGetActiveOtelContext, updateHistory, validateCanonicalRun };