aboutsummaryrefslogtreecommitdiff
path: root/tests/documents.tests.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-03-29 22:44:29 +0000
committerMichael Williamson <mike@zwobble.org>2013-03-29 22:44:29 +0000
commit785deeefe5e64b0a12786d3d9647e403c320b99e (patch)
tree02dad1eecc0a369f92d888234ce75fe58121e4db /tests/documents.tests.js
parentd978f126b9847f45f17f4bd8419236a99bfe99a9 (diff)
Pass options from Converter through to DocumentConverter
Diffstat (limited to 'tests/documents.tests.js')
-rw-r--r--tests/documents.tests.js10
1 files changed, 10 insertions, 0 deletions
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("<h1>Hello.</h1>", result.html);
+ });
+ });
+
test('text is HTML-escaped', function() {
var document = new documents.Document([
paragraphOfText("1 < 2")