From d72114d801b0aa0ce34614df9cdd6880f58d834f Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 17 Jun 2015 15:48:14 +0100 Subject: Fix ordering of tests --- tests/document-to-html.tests.js | 30 +++++++++++++++--------------- 1 file 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, "Hello."); + }); + }); + test('strikethrough runs are wrapped in 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, "Hello."); }); }); - - 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, "Hello."); - }); - }); test('italic runs are wrapped in tags', function() { var run = runOfText("Hello.", {isItalic: true}); -- cgit v1.2.3