Golden File Testing & Normalization
Automates the creation of robust golden file tests by normalizing dynamic fields like timestamps, UUIDs, and environment-specific paths.
This skill streamlines the implementation of snapshot testing by identifying and redacting non-deterministic data such as dates, durations, and local file paths. By applying consistent normalization to both the test output and the stored golden files, it prevents tests from failing due to superficial changes, making integration and regression testing significantly more reliable across different machines and execution times. It is ideal for developers working with CLI outputs, API responses, or complex string data where traditional assertions are too granular.
Características Principales
01Regex-based pattern matching for common dynamic fields
02Automated temporal normalization for dates and timestamps
036 GitHub stars
04Standardized golden file generation and update workflows
05Environment-agnostic path and port normalization
06Redaction of non-deterministic IDs and random UUIDs
Casos de Uso
01Validating API responses containing dynamic timestamps or database IDs
02Testing CLI output that includes execution durations and local paths
03Regression testing complex string outputs in cross-platform CI/CD pipelines