Skip to content

Latest commit

 

History

History
216 lines (164 loc) · 8.38 KB

API.md

File metadata and controls

216 lines (164 loc) · 8.38 KB

CTRF TypeScript Reference Implementation

A complete TypeScript implementation for working with CTRF (Common Test Report Format) reports.

Quick Start

Core Operations

The core functions for working with CTRF reports:

  • validate - Validate schema and normative cross-field rules
  • isValid - Type guard to check if a report is valid
  • validateStrict - Validate and throw on invalid reports
  • parse - Parse JSON string into a CTRFReport
  • stringify - Serialize a CTRFReport to JSON
  • calculateSummary - Calculate test statistics

Building Reports

Fluent API for constructing CTRF reports programmatically:

CTRF Report Types

The core schema types that define CTRF structure (what consumers import):

Primary Types:

Supporting Types:

API Reference by Category

Query & Filter

Insights

Merge

  • merge - Combine multiple reports

Schema & Versioning

Type Guards

Runtime type checking functions:

ID Generation

Constants

Error Classes

Library Types

Helper types for using this library's utilities (not part of CTRF schema):

Complete API Index

All Classes
All Functions
All Interfaces
All Type Aliases
All Variables