|
@ -6,11 +6,6 @@ var load = require('markdown-it-testgen').load; |
|
|
var assert = require('chai').assert; |
|
|
var assert = require('chai').assert; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function normalize(text) { |
|
|
|
|
|
return text.replace(/<blockquote>\n<\/blockquote>/g, '<blockquote></blockquote>'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function generate(path, md) { |
|
|
function generate(path, md) { |
|
|
load(path, function (data) { |
|
|
load(path, function (data) { |
|
|
data.meta = data.meta || {}; |
|
|
data.meta = data.meta || {}; |
|
@ -20,7 +15,7 @@ function generate(path, md) { |
|
|
(data.meta.skip ? describe.skip : describe)(desc, function () { |
|
|
(data.meta.skip ? describe.skip : describe)(desc, function () { |
|
|
data.fixtures.forEach(function (fixture) { |
|
|
data.fixtures.forEach(function (fixture) { |
|
|
it(fixture.header ? fixture.header : 'line ' + (fixture.first.range[0] - 1), function () { |
|
|
it(fixture.header ? fixture.header : 'line ' + (fixture.first.range[0] - 1), function () { |
|
|
assert.strictEqual(md.render(fixture.first.text), normalize(fixture.second.text)); |
|
|
assert.strictEqual(md.render(fixture.first.text), fixture.second.text); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|