2022-02-24 08:16:31 +08:00
|
|
|
/**
|
|
|
|
* Created by Estevao on 08-06-2015.
|
|
|
|
*/
|
|
|
|
var bootstrap = require('./makemarkdown.bootstrap.js'),
|
|
|
|
showdown = bootstrap.showdown,
|
|
|
|
assertion = bootstrap.assertion,
|
2022-04-17 03:06:05 +08:00
|
|
|
issues = bootstrap.getTestSuite('test/functional/makemarkdown/cases/features/issues/'),
|
|
|
|
ghMentions = bootstrap.getTestSuite('test/functional/makemarkdown/cases/features/ghMentions/');
|
2022-02-24 08:16:31 +08:00
|
|
|
|
|
|
|
describe('makeMarkdown() features testsuite', function () {
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
describe('issues', function () {
|
2022-04-17 03:06:05 +08:00
|
|
|
for (var i = 0; i < issues.length; ++i) {
|
2022-02-24 08:16:31 +08:00
|
|
|
var converter;
|
2022-04-17 03:06:05 +08:00
|
|
|
if (issues[i].name === '#164.4.tasklists') {
|
2022-02-24 08:16:31 +08:00
|
|
|
converter = new showdown.Converter({tasklists: true});
|
|
|
|
} else {
|
|
|
|
converter = new showdown.Converter();
|
|
|
|
}
|
2022-04-17 03:06:05 +08:00
|
|
|
it(issues[i].name.replace(/-/g, ' '), assertion(issues[i], converter));
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('ghMentions', function () {
|
|
|
|
var converter = new showdown.Converter({ ghMentions: true });
|
|
|
|
for (var i = 0; i < ghMentions.length; ++i) {
|
|
|
|
it(ghMentions[i].name.replace(/-/g, ' '), assertion(ghMentions[i], converter));
|
2022-02-24 08:16:31 +08:00
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|