The `commonmark-test-suite` package provides programmatic access to the official CommonMark Specification test suite data, enabling developers to verify their CommonMark parsers against a standardized set of examples. It aggregates and exposes test cases for various CommonMark spec versions, including the latest stable version (currently 0.31.2, released January 28, 2024). This package itself is at version 0.1.0, indicating it is a relatively new utility that serves as a structured, up-to-date data source for the evolving CommonMark specification. Its primary differentiator is pre-processing and organizing the raw spec test data into an easily consumable JavaScript format, eliminating the need for manual parsing of the spec documents. The release cadence of this package is generally aligned with updates to the CommonMark spec, ensuring that the test data remains current and comprehensive.
npm install commonmark-test-suiteVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to import the `commonmark-test-suite` and access both the latest and specific legacy versions of the CommonMark test cases, logging their metadata and a few examples.
Always refer to `commonmarkTestSuite.latest.version` or `commonmarkTestSuite['<version_number>'].version` to identify the CommonMark spec version.
Ensure your development and production environments are running Node.js v14 or a more recent LTS version.
Change `const commonmarkTestSuite = require('commonmark-test-suite')` to `import commonmarkTestSuite from 'commonmark-test-suite'` in your JavaScript or TypeScript files.Verify the available spec versions by logging `Object.keys(commonmarkTestSuite)` or ensure you are using a valid version string, typically found in the `latest` object or the package's documentation (e.g., `'0.31.2'`, `'0.30'`).
No dependency data recorded yet.