The `yaml-test-suite` package provides a JavaScript representation of the official YAML test suite data, as defined by the YAML community. It encapsulates a comprehensive collection of YAML test cases, including their original filenames, descriptive names, source URLs, associated tags, and individual test scenarios (with YAML input and expected JSON output). Currently at version 0.1.0, this library is a relatively stable data source, primarily seeing updates when the underlying YAML test suite itself evolves or when minor structural enhancements are added (like the `id` field in 0.1.0). Its primary differentiation is offering this suite as a directly consumable JavaScript array, eliminating the need for developers to parse raw YAML test files manually, making it ideal for testing YAML parsers, linters, or other YAML-related tools within JavaScript or TypeScript environments.
Verified import paths — ran on the pinned version, not inferred.
The package exports its entire test suite data (an array of objects) as the default export. This is the primary way to consume it in ESM projects.
For CommonJS environments, `require` directly resolves to the default export. The `.default` property is generally not needed when importing the default export this way.
The package ships with TypeScript types. The main type for the entire suite is `YamlTestSuiteData`, which represents the array of test case objects. This is a type-only import.
This quickstart code loads the entire YAML test suite and logs basic statistics, then iterates through the first few test cases to display their structure, including filenames, names, tags, and truncated YAML input/JSON output of their sub-cases.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.