{"id":14598,"library":"gfm-test-suite","title":"GitHub Flavored Markdown Test Suite Data","description":"The `gfm-test-suite` package, currently at version 0.0.2, provides a JavaScript representation of the GitHub Flavored Markdown (GFM) test suite. It specifically encapsulates the GFM Specification data (version 0.29-gfm, dated 2019-04-06) into a readily consumable JavaScript object. This utility allows developers to programmatically access official GFM test cases, which is invaluable for validating markdown parsers, testing rendering engines, or implementing GFM-compliant features. Its release cadence appears infrequent, with updates primarily addressing compatibility rather than introducing new features, indicating its role as a data-centric library. Its key differentiator is providing direct, structured access to this specific version of the GFM test data without requiring manual parsing of the specification document.","status":"maintenance","version":"0.0.2","language":"javascript","source_language":"en","source_url":"https://github.com/fisker/gfm-test-suite","tags":["javascript","typescript"],"install":[{"cmd":"npm install gfm-test-suite","lang":"bash","label":"npm"},{"cmd":"yarn add gfm-test-suite","lang":"bash","label":"yarn"},{"cmd":"pnpm add gfm-test-suite","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The library primarily exports the test suite data as its default export. While CommonJS `require` might work via transpilation, native ESM `import` is the idiomatic approach.","wrong":"const gfmTestSuite = require('gfm-test-suite')","symbol":"default","correct":"import gfmTestSuite from 'gfm-test-suite'"},{"note":"Import the TypeScript type definition for the test suite data structure. Essential for type-checking and autocompletion.","symbol":"GfmTestSuiteData","correct":"import type { GfmTestSuiteData } from 'gfm-test-suite'"}],"quickstart":{"code":"import gfmTestSuite from 'gfm-test-suite';\n\nconsole.log(`GFM Spec Version: ${gfmTestSuite.version}`);\nconsole.log(`GFM Spec Date: ${gfmTestSuite.date}`);\nconsole.log(`Total GFM Test Cases: ${gfmTestSuite.testCases.length}`);\n\n// Example: Access the first test case\nconst firstCase = gfmTestSuite.testCases[0];\nif (firstCase) {\n  console.log('\\n--- First Test Case ---');\n  console.log('Section:', firstCase.section.trim());\n  console.log('Example:', firstCase.example);\n  console.log('Markdown Input:\\n', firstCase.markdown.trim());\n  console.log('Expected HTML Output:\\n', firstCase.html.trim());\n}","lang":"typescript","description":"Demonstrates how to import the GFM test suite data and access its properties, including the version, date, and individual test cases."},"warnings":[{"fix":"Verify if the embedded spec data (via `gfmTestSuite.date` and `gfmTestSuite.version`) is sufficient for your application's needs or if you require a more current source of GFM test data.","message":"The GFM specification data included in this package is based on version 0.29-gfm, dated 2019-04-06. Newer versions of the GFM specification or GitHub's actual rendering might have evolved since this date, potentially leading to discrepancies if strict up-to-date compliance is required.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Pin to exact versions in production environments (e.g., `\"gfm-test-suite\": \"0.0.2\"`) and conduct thorough testing before upgrading.","message":"The package is currently at a very early development version (0.0.2). While functional, this might imply a higher risk of unannounced changes in future patch or minor releases, or a lack of long-term maintenance if the author's focus shifts.","severity":"gotcha","affected_versions":"<1.0.0"},{"fix":"Always refer to the imported default object (`gfmTestSuite`) for accessing the test suite data, e.g., `console.log(gfmTestSuite)`.","message":"The quickstart example in the README uses `console.log(latest)` without defining `latest`. The correct usage, implied by the output, is to log the default import `gfmTestSuite` itself or one of its properties.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[],"ecosystem":"npm"}