diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-06-17 15:48:14 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-06-17 15:48:14 +0100 |
| commit | d72114d801b0aa0ce34614df9cdd6880f58d834f (patch) | |
| tree | 6e91e47512914bf4bcc3dc85c35f812ea2decb8e | |
| parent | 62e6d800f0dd5b649ed094c3879e57a9c50dab8a (diff) | |
Fix ordering of tests
| -rw-r--r-- | tests/document-to-html.tests.js | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/document-to-html.tests.js b/tests/document-to-html.tests.js index 2088f12..aef6dfb 100644 --- a/tests/document-to-html.tests.js +++ b/tests/document-to-html.tests.js @@ -202,6 +202,21 @@ describe('DocumentConverter', function() { }); }); + test('style mapping for underline runs does not close parent elements', function() { + var run = runOfText("Hello.", {isUnderline: true, isBold: true}); + var converter = new DocumentConverter({ + styleMap: [ + { + from: documentMatchers.underline, + to: htmlPaths.elements([htmlPaths.element("u")]) + } + ] + }); + return converter.convertToHtml(run).then(function(result) { + assert.equal(result.value, "<strong><u>Hello.</u></strong>"); + }); + }); + test('strikethrough runs are wrapped in <s> tags by default', function() { var run = runOfText("Hello.", {isStrikethrough: true}); var converter = new DocumentConverter(); @@ -224,21 +239,6 @@ describe('DocumentConverter', function() { assert.equal(result.value, "<del>Hello.</del>"); }); }); - - test('style mapping for underline runs does not close parent elements', function() { - var run = runOfText("Hello.", {isUnderline: true, isBold: true}); - var converter = new DocumentConverter({ - styleMap: [ - { - from: documentMatchers.underline, - to: htmlPaths.elements([htmlPaths.element("u")]) - } - ] - }); - return converter.convertToHtml(run).then(function(result) { - assert.equal(result.value, "<strong><u>Hello.</u></strong>"); - }); - }); test('italic runs are wrapped in <em> tags', function() { var run = runOfText("Hello.", {isItalic: true}); |
