turndown-attendant
Test runner for HTML to Markdown conversions with Turndown
Usage
Specify you input HTML and your expected output in an HTML file:
<!-- test.html --> Hello world # Hello world
Create a new attendant with the TurndownService
class, the HTML file, and optionally a beforeEach
function which gets called with the new TurndownService
instance. (This is useful for applying plugins.) Then call run
to run the test cases.
var TurndownService = var Attendant = var attendant = Turndown: TurndownService file: '/path/to/test.html' { turndownService } attendant
To run tests that do not require HTML or a DOM, access test
on the attendant
instance:
attendant