1
0
Fork 0
This repository has been archived on 2024-02-06. You can view files and clone it, but cannot push or open issues or pull requests.
markdown-it-katex/test/all.js
Waylon Flinn e31c2bab7a comments
2016-04-21 13:01:05 -05:00

29 lines
689 B
JavaScript

var path = require('path'),
tape = require('tape'),
testLoad = require('markdown-it-testgen').load,
mdk = require('../index');
var md = require('markdown-it')()
.use(mdk);
/* this uses the markdown-it-testgen module to automatically generate tests
based on an easy to read text file
*/
testLoad(path.join(__dirname, 'fixtures/default.txt'), function(data){
data.fixtures.forEach(function (fixture){
/* generic test definition code using tape */
tape(fixture.header, function(t){
t.plan(1);
var expected = fixture.second.text,
actual = md.render(fixture.first.text);
t.equals(actual, expected);
//generate(, { "assert" : t.assert }, md);
});
});
});