From 5c7aa27a92265e0890f3b970ca8102751e0d7e01 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 1 Apr 2013 13:01:33 +0100 Subject: Add mapping for run styles --- tests/documents.tests.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/documents.tests.js') 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, "Hello."); }); }); + + 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, "Hello."); + }); + }); }); function paragraphOfText(text, styleName) { -- cgit v1.2.3