test: small test refactoring

This commit is contained in:
Estevao Soares dos Santos 2017-11-16 18:34:02 +00:00
parent 5d70b921b1
commit dd7efb5a8a
5 changed files with 16 additions and 5 deletions

2
dist/showdown.js vendored
View File

@ -1,4 +1,4 @@
;/*! showdown v 1.8.2 - 11-11-2017 */ ;/*! showdown v 1.8.2 - 16-11-2017 */
(function(){ (function(){
/** /**
* Created by Tivie on 13-07-2015. * Created by Tivie on 13-07-2015.

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,8 @@ var bootstrap = require('../bootstrap.js'),
rawHeaderIdSuite = bootstrap.getTestSuite('test/features/rawHeaderId/'), rawHeaderIdSuite = bootstrap.getTestSuite('test/features/rawHeaderId/'),
rawPrefixHeaderIdSuite = bootstrap.getTestSuite('test/features/rawPrefixHeaderId/'), rawPrefixHeaderIdSuite = bootstrap.getTestSuite('test/features/rawPrefixHeaderId/'),
emojisSuite = bootstrap.getTestSuite('test/features/emojis/'), emojisSuite = bootstrap.getTestSuite('test/features/emojis/'),
underlineSuite = bootstrap.getTestSuite('test/features/underline/'); underlineSuite = bootstrap.getTestSuite('test/features/underline/'),
literalMidWordAsterisksSuite = bootstrap.getTestSuite('test/features/literalMidWordAsterisks/');
describe('makeHtml() features testsuite', function () { describe('makeHtml() features testsuite', function () {
'use strict'; 'use strict';
@ -196,8 +197,8 @@ describe('makeHtml() features testsuite', function () {
} }
}); });
/** test emojis support **/ /** test underline support **/
describe('emojis support', function () { describe('underline support', function () {
var converter, var converter,
suite = underlineSuite; suite = underlineSuite;
for (var i = 0; i < suite.length; ++i) { for (var i = 0; i < suite.length; ++i) {
@ -209,4 +210,14 @@ describe('makeHtml() features testsuite', function () {
it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter));
} }
}); });
/** test literalMidWordAsterisks option **/
describe('literalMidWordAsterisks option', function () {
var converter,
suite = literalMidWordAsterisksSuite;
for (var i = 0; i < suite.length; ++i) {
converter = new showdown.Converter({literalMidWordAsterisks: true});
it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter));
}
});
}); });