diff options
Diffstat (limited to 'tests/documents.tests.js')
| -rw-r--r-- | tests/documents.tests.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/documents.tests.js b/tests/documents.tests.js index df10a92..d08500d 100644 --- a/tests/documents.tests.js +++ b/tests/documents.tests.js @@ -119,6 +119,18 @@ describe('DocumentConverter', function() { assert.equal(result.html, "<strong><em>Hello.</em></strong>"); }); }); + + test('run styles are converted to HTML if mapping exists', function() { + var run = runOfText("Hello.", {styleName: "Emphasis"}); + var converter = new DocumentConverter({ + runStyleMap: { + "Emphasis": styles.elements(["strong"]) + } + }); + return converter.convertToHtml(run).then(function(result) { + assert.equal(result.html, "<strong>Hello.</strong>"); + }); + }); }); function paragraphOfText(text, styleName) { |
