Skip to content

Commit

Permalink
test: small test refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
tivie committed Nov 16, 2017
1 parent 5d70b92 commit dd7efb5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/showdown.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/showdown.min.js

Large diffs are not rendered by default.

17 changes: 14 additions & 3 deletions test/node/testsuite.features.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ var bootstrap = require('../bootstrap.js'),
rawHeaderIdSuite = bootstrap.getTestSuite('test/features/rawHeaderId/'),
rawPrefixHeaderIdSuite = bootstrap.getTestSuite('test/features/rawPrefixHeaderId/'),
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 () {
'use strict';
Expand Down Expand Up @@ -196,8 +197,8 @@ describe('makeHtml() features testsuite', function () {
}
});

/** test emojis support **/
describe('emojis support', function () {
/** test underline support **/
describe('underline support', function () {
var converter,
suite = underlineSuite;
for (var i = 0; i < suite.length; ++i) {
Expand All @@ -209,4 +210,14 @@ describe('makeHtml() features testsuite', function () {
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));
}
});
});

0 comments on commit dd7efb5

Please sign in to comment.