From 785deeefe5e64b0a12786d3d9647e403c320b99e Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Fri, 29 Mar 2013 22:44:29 +0000 Subject: Pass options from Converter through to DocumentConverter --- tests/documents.tests.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/documents.tests.js') diff --git a/tests/documents.tests.js b/tests/documents.tests.js index 629e0da..d5db03a 100644 --- a/tests/documents.tests.js +++ b/tests/documents.tests.js @@ -17,6 +17,16 @@ describe('DocumentConverter', function() { }); }); + test('can use non-default HTML element for unstyled paragraphs', function() { + var document = new documents.Document([ + paragraphOfText("Hello.") + ]); + var converter = new DocumentConverter({defaultParagraphStyle: styles.topLevelElement("h1")}); + return converter.convertToHtml(document).then(function(result) { + assert.equal("

Hello.

", result.html); + }); + }); + test('text is HTML-escaped', function() { var document = new documents.Document([ paragraphOfText("1 < 2") -- cgit v1.2.3