package
Tests generator for markdown-it markdown parser
npm install markdown-it-testgenGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 5 packages.
1.9 MB
Includes dependencies.
3 direct · 2 outdated
This package parses fixtures in commonmark spec format and generates tests for markdown-it parser and plugins.
npm install markdown-it-testgenEach fixture can have optional metadata in yaml format:
---
desc: Batch description # file name used if not exists.
skip: true # mark batch as pending
---Then tests should follow in this format:
optional header
.
source
data
.
parsed
data
.
header2
.
src
.
result
.If header missed - line number will be used instead.
false. Set true to use heaters for test namesrequire('chai').assert by default.markdown-it instance to parse and compare samplesFor each loaded file - parse and pass data to iterator functions. Currently used for tests only.